################################################################################ ################################################################################ TTTTTTTTTTT OOOOOOOOOOOO PPPPPPPPPPPP TTTTTTTTTTT OOOOOOOOOOOO PPPPPPPPPPPP TTT OOO OOO PPP PPP TTT OOO OOO PPP PPP TTT OOO OOO PPPPPPPPPPPP TTT OOO OOO PPPPPPPPPPPP TTT OOOOOOOOOOOO PPP TTT OOOOOOOOOOOO PPP TOP The Premier DOS Command Enhancement Utility ____________ | __ | |\ | | _______ | | \| |__ ____|__ | (R) --| | |------------------- TOP Copyright (c) 1990, 1991, 1992 | ____|__ | Association of by TNC Technology, All Rights Reserved | | |_| Shareware GTDR |__| o | Professionals -----| | |--------------------- Another fine product from TNC Technology |___|___| MEMBER ################################################################################ ################################################################################ TNC Technology TOP Manual TOP(tm) Command Enhancement Utility Written by: Leon C. Williams (he never sleeps) Executive Producer: Tom Beikirch (he complains a lot) TOP(tm) Program and documentation Copyright (c) 1990, 1991, 1992 by TNC Technology. All rights reserved, GTDR. TOP(tm) is a trademark of TNC Technology. PC(tm), PC-DOS(tm), PC XT(tm), PC AT(tm), PS/2(tm), and IBM(tm) are registered trademarks of IBM Corporation. MS-DOS(tm) and OS/2(tm) are registered trademarks of Microsoft Corporation. UNIX(tm) is a registered trademark of AT&T Corporation. Kleenex(tm) is a registered trademark of Kimberly-Clark Corp. Direct any inquires about this program or documentation to: TNC Technology 1084 Webster Road Webster, New York 14580 Voice: 716-872-1377 (after 6pm M-F EST, otherwise machine attended) BBS: 716-872-4913 (8-N-1, 24 hours) CompuServe: 70403,2351 Any other resemblance to any other person or trademark, real or fictional, is purely coincidental and in no way should be construed as harmful, malicious, purposeful, or anything else that could get us into trouble. So there. 1 TNC Technology TOP Manual Acknowledgements Special thanks to IBM(tm) and Microsoft for their never ending lack of features which created this market opportunity. TOP is written in Microsoft C 6.0 and assembly language. Several features were inspired by UNIX(tm). This manual was created and formatted with Xerox Ventura Publisher 3.0. The word DOS in this manual refers to either MS-DOS(tm) or PC-DOS(tm), your choice. Many thanks to our Beta testers (in random order): Ray Clark, Greg Tellex, Jessie Zeck, Paul Norder, Dick Maus, Bob Beikirch, Francis Tse, Fred Hayes, Tommy Richenderfer, Rocky Martin, Bob Lonis, Bob Herloski, Bob Clarke, Theresa Ciccone, Joe Taille, Ned Seachman, YingWei Lin, John Moore, Tom Davis, Bart Selby, and Perry Bowen. Both authors wish to thank their wives for their continued support and patience even when they didn't and weren't, and we'll be there any day now, we promise. 2 TNC Technology TOP Manual TOP(tm) Registration Form TOP Version 1.10 Mail To: TNC Technology 1084 Webster Road Webster, New York 14580 By phone: 716-872-1377, (after 6pm M-F EST) Each Quantity Price Disk, manual, plus one upgrade $50 _______ _______ Disk only, no upgrade $40 _______ _______ Subtotal _______ NY Residents please add 7% Sales Tax _______ Shipping (included in continental USA, others add $3) _______ Technical Support for one year from purchase date Included Additional Technical Support / Upgrade Licenses Call TNC Total enclosed _______ Payment by: __Check __Money Order Diskette size: __5.25" acceptable __3.5" required Name: ________________________________________________________ Company: ________________________________________________________ Address: ________________________________________________________ ________________________________________________________ ________________________________________________________ Day Phone: ________________________________________________________ I have read and agree to abide by the TOP license and warrantee agreement (obtained by typing HELP !LICENSE at the prompt after starting TOP). (signed) ________________________________________________________ Where did you get TOP? Please indicate your shareware registration number. ________________________________________________________ Any suggestions or comments? ________________________________________________________ ________________________________________________________ ________________________________________________________ 3 TNC Technology TOP Manual WARRANTEE *** ONE YEAR MONEY BACK GUARANTEE *** As with any software, TOP may inadvertently contain errors in programming or documentation. If you find any such error, or are otherwise dissatisfied with a registered version of TOP, you may return the entire package at any time up to one year after purchase for a full refund of your registration fee. This refund of your registration fee is the maximum liability assumed by TNC Technology, which is not liable for any other costs incurred by you for programming or documentation errors. *** WARRANTEE DISCLAIMER *** TNC Technology DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER TNC Technology, NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE EVEN IF TNC Technology HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL TNC Technology LIABILITY FOR ANY DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF THE CLAIM. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. Some states do not allow the exclusion of the limit of liability for consequential or incidental damages, so the above limitation may not apply to you. This agreement shall be governed by the laws of the State of New York and shall inure to the benefit of TNC Technology, and any successors, administrators, heirs and assigns. Any action or proceeding brought by either party against the other arising out of or related to this agreement shall be brought only in a STATE or FEDERAL COURT of competent jurisdiction located in Monroe County, New York. The parties hereby consent to in personam jurisdiction of said courts. 4 TNC Technology TOP Manual TOP(tm) License Agreement This is a no-nonsense license agreement in that the terms outlined below are intended to be fair and reasonable. We do not, for example, expect you to buy two copies for your home and laptop computer any more than you do. So please help us maintain the integrity of this product by reading and abiding by the simple terms below, and sign the accompanying TOP registration form. In turn, we will continue to provide you with a quality product at a reasonable cost. TOP and all other programs, documentation, and data distributed or shipped with it are copyrighted and are protected under United States and international copyright law. The programs, documentation, and data are collectively referred to in this manual as TOP. You are granted a license to use your copy of TOP only under the conditions and terms specified in this license agreement. TOP is distributed as shareware, which means you can try it before you buy it. It is not free or public domain. You may use TOP at no charge for a period of 30 days. If you wish to continue using TOP after that period, you must pay the registration fee in the accompanying TOP registration form. If you choose not to pay the registration fee, you must stop using TOP and delete it and all ancillary programs from your computer. However, you may keep shareware copies and pass them along to others who may use them at no charge for 30 days. You may use your registered version of TOP on multiple computers, provided there is no possibility that more than one person will be using it at any one time. Treat this software as if it were a book: you may loan it to someone but then you don't have it. Multiple user, network, and corporate licenses are available from TNC Technology. You may copy TOP for backup purposes, and you may give copies of the unregistered shareware version of TOP to others. If you copy the unregistered shareware version for others, you must include all the files distributed with it. You may not charge a fee for distribution without express permission from TNC Technology. You may not give, sell, or otherwise transfer copies of the registered version of TOP to any other person or company for any reason without the written consent of TNC Technology. You may transfer ownership of your registered version of TOP provided that when you do so, you delete it and all accompanying programs from your computer. If you do transfer ownership, please notify TNC Technology of the new owner so update information can be forwarded. You may not give, sell, or otherwise transfer your registered TOP user ID number. TOP greatly extends the power and flexibility of your computing. We have taken many pains to ensure the software does not get you into trouble but, like any software, improper use can possibly damage or delete your computer software or data. You assume full responsibility for the selection and proper use of TOP; TNC Technology is not responsible for any damage whatsoever resulting from errors in usage or your failure to read and understand the instructions in this manual. If you have any questions about the use of TOP, you may call the TNC hot line given in Appendix A of the TOP manual. As with any software, TOP may inadvertently contain errors in programming or documentation. If you find any such error, or are otherwise dissatisfied with a 5 TNC Technology TOP Manual registered version of TOP, you may return the entire package at any time up to one year after purchase for a full refund of your registration fee. This refund of your registration fee is the maximum liability assumed by TNC Technology, which is not liable for any other costs incurred by you for programming or documentation errors. If you do not agree with the terms in this license agreement, then you do not have permission from the copyright holders to use TOP, and must remove TOP from your computer. Thank you for reading the TOP license agreement. Now, enjoy! 6 TNC Technology TOP Manual ASP Ombudsman Notice This program is produced by a member of the Association of Shareware Professionals (ASP). ASP wants to make sure that the shareware principle works for you. If you are unable to resolve a shareware-related problem with an ASP member by contacting the member directly, ASP may be able to help. The ASP Ombudsman can help you _______ resolve a dispute or problem with ____|__ | (R) an ASP member, but does not provide --| | |------------------- technical support for members' | ____|__ | Association of products. Please write to the ASP | | |_| Shareware Ombudsman at 545 Grover Road, |__| o | Professionals Muskegon, MI 49442 or send a Compu- -----| | |--------------------- Serve message via CompuServe Mail |___|___| MEMBER to ASP Ombudsman 70007,3536. 7 ################################################################################ ################################################################################ Chapter 1 Introduction ################################################################################ ################################################################################ TNC Technology TOP Manual Introduction Welcome, and thank you for using TOP, the premier DOS command enhancement utility. TOP was created by individuals who believe in the command line interface but were frustrated by the mundane, repetitive nature of DOS, just like you are. TOP is a well-behaved program which does not replace COMMAND.COM, but simplifies and adds to its usage. Since COMMAND.COM is not replaced, TOP will not exclude you from future DOS updates, nor will it make obsolete your current DOS work that you've slaved to create. TOP will simply make your work more productive by speeding up and simplifying many repetitive tasks you do every day. TOP is a DOS shell type program, but not in the sense that it tries to isolate the user from DOS. Rather, TOP simplifies and speeds up DOS commands in the background by pre-processing each command line. Special new commands have been added which fill the gaps DOS left behind. Judicious use of the new commands can greatly enhance performance as well as simplify any complex command. What to Read? For the most part, nobody ever reads the manual until they get into trouble. If you're one of these people, TOP will work for you anyway because it's EASY! After all, the best way to learn any new program is to just try it! For you, there is a chapter entitled "TOP Command Reference" which you can refer to when you have a particular question. However, many of the features TOP provides are subtle and not so obvious at first, but will become much appreciated as you get to know them. To get the most out of TOP, we recommend you at least browse chapter 4, "Using TOP," which presents an overview of how to use all of TOP's feature set, and chapter 1, "Customization and TOP.INI," which explains how to customize TOP's interface to you. How TOP Works TOP works by intercepting everything you type on the command line, before DOS gets a chance to muck with it. If the command you type is something TOP recognizes, it quickly executes it without DOS intervention. Otherwise, the command is passed to DOS. In this way TOP adds new commands and command enhancements without blocking you from future DOS updates. TOP is a "DOS Shell" type program, not a terminate and stay resident (TSR) program. The term "shell" is used because TOP runs on TOP of DOS and forms an extra layer of software between you and the operating system. Once started, TOP does not terminate (unless you exit). Because TOP is always running, it does not need to "hook" into critical system interrupt vectors the way many ill- behaved utility programs do. The shell nature of TOP is inherently non-invasive to your system and does not interfere or conflict with even the most difficult and incompatible commercial programs you may own. The shell approach is what allows TOP to interpret commands before they reach Introduction 1-2 TNC Technology TOP Manual DOS and handle ones it recognizes instantly and efficiently. Remember, commands TOP does not recognize are simply passed through to DOS. Commands TOP would not recognize include any commands in future DOS updates and therefore you will not be blocked from using them. Other commands TOP does not recognize are of course all your other user programs. Whenever TOP passes an unrecognized command to DOS, it first removes itself from DOS memory ("swaps out") to minimize its use of DOS resources as much as possible. For all intents and purposes, during execution of any unrecognized DOS command or your programs, TOP is essentially "gone." Is There Anything TOP Won't Do? So what won't TOP do? Well, it doesn't cook breakfast (unless your PC is wired to the stove-use a CRON entry). More importantly, since TOP is not actually there when your programs are running, its features are unavailable then too. For example, don't expect a CRON job or a TOPDMT to be run while you're working with your word processor (any missed CRON jobs will be run right after TOP resumes execution). See the chapter "Using TOP" for more details on CRON and TOPDMT jobs. Manual Typographic Conventions This fancy title refers to the style of type used throughout this manual. All manual text appears as you see it here, except user examples. User examples are shown in a fixed space type, and look like: C:\TOP>myprog parm1 [parm2] User examples will always be indented as above. Underlined text in examples identifies the text the user is expected to type, and items contained in square brackets [ ] are optional. In examples or manual text, a keyboard key other than a letter or number is referred to by its name and will be enclosed in angle brackets <> to indicate a single keypress. For example, refers to the "Alt" key, or refers to the "Enter" key. All examples assume your PROMPT line at least contains the string $p$g so the current directory followed by the > character is displayed as part of your prompt; this is not absolutely necessary, but will make your screen match the examples. One Last Word on Shareware TOP is distributed as shareware, which means you can try it before you buy it. Many midnight hours went into the reading of obscure DOS technical reference manuals before TOP was completed, so if you like the program, and believe that the little guy can someday rise above the tyranny of working for someone else all his life, a registration fee is requested to help pay for glasses, a new keyboard, and many related future products. If you send in your full registration fee, we will send you a version of TOP that does not print an annoying message to the screen after 30 days, as well as a nicely printed manual. Also, you will be kept informed of any future updates or bug fixes. In Introduction 1-3 TNC Technology TOP Manual the meantime, please feel free to share the unregistered shareware version of TOP with your friends. Introduction 1-4 ################################################################################ ################################################################################ Chapter 2 Features ################################################################################ ################################################################################ TNC Technology TOP Manual TOP Features TOP is NOT a replacement for COMMAND.COM as are some DOS command enhancement utilities. It therefore does not exclude users from future DOS updates, nor does it make your current DOS work obsolete. TOP works by preprocessing all command line arguments before they can be passed to COMMAND. If the command line contains arguments which TOP recognizes, such as special TOP commands, these are executed immediately. Otherwise, the arguments are simply passed to COMMAND and executed normally. TOP recognizes several normal DOS commands and executes these faster and more efficiently. However, the real power of TOP can be found in the new commands and features which have been added to the DOS environment, including: Minimal Memory Usage TOP utilizes expanded, extended, or disk file memory to swap out a transient portion of its run file. The resident portion of TOP requires less than 3K bytes of RAM. Context Sensitive Help At the press of a key or click of the mouse, context sensitive HELP is available. What's more, you don't have to leave HELP to continue with what you're doing! HELP message text can be cut and pasted from the screen into your command line using the mouse. All HELP messages are read from an ascii text file which can be user modified or added to. You can even add HELP messages for your own programs. Call TNC Technology for information regarding specialized HELP files, including alternate (foreign) languages. Extended VGA Text Mode Support TOP supports all the extended VGA text modes of most popular video card manufacturers. No special ANSI drivers or special utilities required! See the README.VGA file on your release disk. Command History TOP can store and recall hundreds of previously issued commands. Any of these can be quickly retrieved, edited, and re-issued using enhanced search capabilities. The current command history can be saved and restored from disk allowing the command history to be continued from a previous TOP session. Aliasing TOP provides the ability to assign aliases. Aliases are user-defined command sequences which can be assigned to a single word. Aliases can be thought of as RAM resident batch files, and therefore execute two to three times faster than DOS batch files. Aliases can be nested and can accept command line arguments just like batch files. Chronometer Functions (CRON) One of the most powerful features of TOP, CRON gives you the ability to execute Features 2-2 TNC Technology TOP Manual programs periodically on a user-defined schedule. Entries in the execution schedule can include wildcards, lists, and ranges of times and dates. Imagine a backup which happens automatically every hour or every Friday afternoon! How about Westminister chimes every fifteen minutes? Or set a reminder for the day before that anniversary you always forget. CRON functions can be set for any minute of the year, months in advance. And CRON does not forget to execute a scheduled job even if your computer was off! Interesting audio and video programs have been included with your shareware TOP release to demonstrate and enhance this feature (and more are included with the registered version). Quick and Intuitive Mouse Support TOP provides quick, pop-up access to help, its history buffer, user-defined aliases, its file finder, and its file viewer via any Microsoft compatible (two- button) mouse. Also, text can be copied from anywhere on the screen and then pasted into the command line. Keyboard usage can be cut dramatically! Automatic Time-out Program Automatically execute a program after a user-definable period of idle time. The program can be any executable but is typically used as a "screen saver" or DMT. Several colorful screen saver programs have been included with the shareware version of TOP (several more are included with the registered version). Multiple Commands on a Single Line Several commands can be placed on the command line or in aliases simultaneously by separating them with the ^ character (or any other user defined character). Enhanced Command Line Editing See the entire command line as you scroll left to edit it! Additional functions have been added to delete forward or backward, and cut and paste text from anywhere on the screen. User defined cursor shape for overstrike and insert mode. Screen Color Palette and Cursor Management TOP doesn't just set your screen colors, it maintains your screen color palette, mode, screen lines, typematic rate, and cursor size settings once and for all, even when other programs reset video modes or otherwise muck with them. Recursive Directory, Move, and Delete Commands Like XCOPY, these commands can work across all directories and subdirectories. With them you can locate or find duplicate files, list directories only, move files or entire directories (including subdirectories), rename directories, delete all matching files on an entire drive, even delete entire non-empty directories containing subdirectories! Examine File Contents A built-in file view tool lets you quickly see what's in that file. Unlike TYPE, you can scroll up and down. VIEW enables text or hex display. Like HELP, while Features 2-3 TNC Technology TOP Manual VIEWing a file you can still type at the command line, or use the mouse to cut and paste text from the file to the command line! On-line File Directory Tool A pop-up file directory tool lets you quickly display a directory listing of files and file info of any directory. Unlike DIR, you can scroll up and down to review the listing, or change directories or drives to display other listings. Like HELP, while displaying the file listing you can still type at the command line, or use the mouse to cut and paste file names from the listing to the command line! Case-Sensitive PROMPT and Additional Meta Strings The PROMPT meta strings are case sensitive. New meta strings include time in 12 hour format, AM or PM meridian display, and current free disk space. These can be included as part of your PROMPT string. An example PROMPT string has been included with your release. Time Updated ANSI String Variable In addition to the PROMPT variable, a new ANSI string environment variable, TOPTIME, is recognized which is processed every second. This is particularly useful for displaying the current time on your screen, updated every second. An example TOPTIME string has been included with your release. User-defined Function Keys Assign command sequences to function keys to make often used commands a single keystroke! Keystroke functions are similar to aliases in power and can contain any DOS or TOP command as well as accept command line parameters. Multiple File Parameters Many TOP commands accept multiple file parameters. For example: del *.txt *.doc will delete files matching *.txt and files matching *.doc. Enhanced Wildcards Most TOP commands accept enhanced wildcards. For example: copy *r*.txt d: will copy files with an 'r' anywhere in the name and ending with '.txt' to drive d. NISTIME TOP includes a utility which dials up the National Institute of Standards and Technology (NIST) Automated Computer Time Service (ACTS), retrieves the time, and sets your clock. Features 2-4 TNC Technology TOP Manual Command Line Completion Pressing the key will cycle through a list of files in the current directory at the cursor position in the command line, or cycle through a list of matches if the filename is partly typed or typed with a wildcard spec. TOPSET To make life easy for the novice and expert alike, TOP includes a complete setup tool called TOPSET. Complete with hundreds of lines of context sensitive help, TOPSET speeds your way through the customization of TOP's features. Features 2-5 ################################################################################ ################################################################################ Chapter 3 Installation ################################################################################ ################################################################################ TNC Technology TOP Manual Installation Procedure You will find the installation of TOP is simple and quick. TOP comes with and uses an ascii editable initialization file called TOP.INI that is completely filled out with harmless default choices and lots of comments. No other files or setups are required. After installing TOP, the initialization file can be easily modified by using TOP's setup utility, TOPSET. Hardware Requirements TOP is written for the IBM PC, PC/XT, PC/AT and 100% compatibles. It requires DOS version 3.0 or above. A hard disk is recommended with about 690 Kbytes of space for TOP files, and about 120 Kbytes for TOP audio and video accessories. A Microsoft or compatible mouse is recommended to take advantage of the pop-up mouse interface but is not required. TOP will take advantage of extended or expanded memory if present, or can use standard memory or disk file space if not. The Installation Procedure The distribution disk contains three files. The first file is called INSTALL.BAT and is a batch file used to automatically extract the compressed TOP files on your release disk. The second file contains all TOP files in compressed format and is called TOP.DAT. This file will be extracted to all the files and subdirectories necessary to run TOP when INSTALL is executed. The third file is called READ.ME and contains condensed installation instructions. Before you begin with the installation, jot down the registration number on your release disk so you will have it handy when INSTALL asks for it. If this is a shareware release, you will not need a number. Installation of TOP is simple and straight forward. When INSTALL is run, sample initialization files and setup parameters will be created to help you get up and running immediately. Simply insert the TOP release disk into your floppy drive, log on to that drive, and type INSTALL at the DOS prompt. The default drive and directory INSTALL places TOP in is C:\TOP. For example, if your floppy drive is drive A: and you want to install TOP to drive C:, you would do the following (user input is underlined): C:\> A: A:\> INSTALL -Extraction Messages- -Enter registration number- C:\TOP> After you have completed the installation (and run TOP at least once), all TOP files will have been created. Installing To Another Directory Installation 3-2 TNC Technology TOP Manual You may also include a destination drive letter and a destination path if you want to install TOP to another location. For example, if you wanted to install TOP on drive D: you would type: A:\> INSTALL D: instead of the corresponding line above. If you wanted TOP to be installed in a directory called MYDIR on drive E:, type: A:\> INSTALL E: MYDIR The colon must be used after the drive letter, and no leading or trailing back slashes are allowed in the destination path name. Also, you must include a space between the drive letter and the destination path name as shown above. Post Installation One last thing before we're done with installation: there must be a FILES= statement in your CONFIG.SYS file. If you do not have a FILES= statement in your CONFIG.SYS file, or do not have a CONFIG.SYS file, you must create one and set the FILES equal to or greater than 9 (the default if not specified is 8). The CONFIG.SYS file is a file in the root directory of your hard drive which is used by DOS to load device drivers and extensions to DOS during boot time, before the AUTOEXEC.BAT file is run. To create a CONFIG.SYS file from scratch (if you don't have one) type: cd\ copy con config.sys files=20 Otherwise, simply edit the one you have. Remember to reboot after any AUTOEXEC.BAT or CONFIG.SYS changes so the changes will take effect. Starting TOP TOP can now be started from the TOP directory by simply typing TOP at the command prompt. TOP can also be started from another directory by typing the entire path specification at the command prompt. For example, if you were in a directory called MYDIR on drive D: and the TOP files were in a directory called \TOP on drive C: you would type: D:\MYDIR> c:\top\top -TOP Startup Messages- It is not required that the TOP directory be contained in your path statement, however TOP.EXE must be located in the same directory as the ancillary TOP files TOP.INI and TOP.HLP. TOP will determine the path to itself (and therefore to its ancillary files) on start-up. Most likely you will add a line to the end of your AUTOEXEC.BAT file to start TOP when booting. The AUTOEXEC.BAT is a batch file run by DOS every time the computer is booted. If the last line in your AUTOEXEC.BAT file is similar to Installation 3-3 TNC Technology TOP Manual c:\top\top then TOP will be loaded and run after each boot up. This completes the installation of TOP. Keep reading to find out more about EGA 43 line mode, VGA 50 line mode, or extended VGA mode operation. Refer to chapter 4, "Using TOP," to find out more about using the many features TOP can provide, chapter 6, "Customization and TOP.INI" to learn more about TOP customization, and Appendix E to learn more about TOP's setup utility, TOPSET. Using EGA 43 Line, VGA 50 Line, or Extended VGA Modes DOS 4.0+ provides minimal support for EGA 43 line mode and VGA 50 line mode. Previous DOS versions provide no support at all. If you are already using one of these modes with DOS, you know the headaches: ANSI.SYS must be loaded, and the mode constantly needs resetting every time another program resets it. TOP has overcome these difficulties by providing complete support for EGA 43 line and VGA 50 line mode, as well as support for most popular VGA card manufacturer's extended text modes. Using these modes is quite simple. Using TOP's setup utility, TOPSU, change the VideoMode entry in the [Video] section (see chapter 6, "Customization and TOP.INI" for more details). The mode you select will be maintained permanently while TOP is in control. If you have already been using some form of EGA 43 line or VGA 50 line mode, using DOS 4.0+ and the MODE command, you must know that DOS requires ANSI.SYS to be loaded to support these modes. TOP does not require ANSI.SYS to run in these modes and if there is no other reason for ANSI.SYS you can optionally remove it from your CONFIG.SYS file. Since TOP does not require ANSI.SYS for anything else, including complex ANSI prompt strings, you might as well remove it and consequently save some additional memory. For extended VGA modes, see the file README.VGA that came with your release for up to date information on mode numbers and capabilities. For extended VGA modes, DOS's ANSI.SYS must be removed as it does not support any extended VGA modes. Again, TOP fully supports these modes and it is unlikely you will need ANSI. If you absolutely have to have ANSI.SYS loaded, you cannot use the extended VGA modes, but you can still take advantage of EGA 43 or VGA 50 line modes. Installation 3-4 ################################################################################ ################################################################################ Chapter 4 Using TOP ################################################################################ ################################################################################ TNC Technology TOP Manual Using TOP Using TOP is as easy as using DOS. Up until now you've only heard what the features are, not how to use them. This chapter describes how to work the powerful and yet simple features that TOP provides. This chapter presents an overview of all TOP features. If, after reading this chapter, you still need more details about a particular feature, refer to the TOP Command Reference chapter to follow. Also, see the chapter, "Customization and TOP.INI," which describes how you can customize TOP by modifying the TOP initialization file TOP.INI. In fact, many features described below are controlled through the use of TOP.INI. Starting TOP Whenever TOP is started, it first searches the current directory, then the directory it was loaded from for a file called TOP.INI. This file contains many parameters which are used to initialize TOP to your specification. TOP.INI is also a good place to put any initial TOP commands that you may wish to execute that could not otherwise be executed under DOS. See the [InitialCommands] section of the chapter, "Customization and TOP.INI" for more details. If you started TOP with the default TOP.INI file, some changes to your old DOS display will be immediately apparent. For one thing, the prompt characters are not capitalized, and there appears to be a live clock display in the upper right corner. These are just some of the new features you now have control over. You can also use TOP to: Get on-line context sensitive help by pressing (go on-try it). Recall or search for previously issued commands using HISTORY. Use enhanced editing features to edit the command line. Put multiple commands on the command line. Assign user defined command sequences to a single word using ALIAS. Schedule programs to be executed once or periodically at some future time using CRON. Define case sensitive prompts with TOPPROMPT. Automatically write an ANSI string every second using TOPTIME. Automatically execute a user-specified program if the computer remains idle using TOPDMT. Define keystroke macros to unused function keys using FKEY. Specify and maintain a user-defined color palette and video mode, regardless of intervention by other programs. Access many TOP features with your mouse. Using TOP 4-2 TNC Technology TOP Manual Move or rename files or directories using MOVE. Delete non-empty directories or all matching files using XDEL. Find files or directories and determine disk space usage using XDIR. Quickly examine the contents of files using VIEW. Change drive and directory simultaneously using CDD. Save and recall the current directory using PUSHD and POPD. Use Super VGA text modes! Use multiple file parameters with most TOP commands. Use enhanced wildcards. Using your modem, dial up the National Institute of Technology and Standards (NIST), retrieve the time, and accurately set your PC clock. Automatically complete partially typed filenames at the command line. On-Line HELP On-line context sensitive help is available at any time during a command entry. Unlike other "help" facilities which make you deactivate help before you can go on, you may continue to type even when help is activated. In addition, the help messages are read from an ascii text file which you can edit. Messages can be customized, and new help messages can be added for your own programs! Help is activated at any time by pressing , or by typing HELP optionally followed by a keyword on the command line, or by using the mouse chord pop-up (see the chapter "Using the Mouse and TOP Windows"). Command line invoked help can be redirected to a printer or a file. When help is activated with or the mouse, the first help message which matches what you have typed so far on the command line is retrieved and displayed in a window at the top of your screen. If more than one message is available which matches what you have typed, pressing again will retrieve the next matching message. This situation would occur particularly if what you have typed is incomplete; for example typing only the letter D would cause HELP to retrieve messages for DATE, DEL, DIR, DISKCOMP, and DISKCOPY. Pressing deactivates help. HELP Key Summary The table below summarizes the HELP keys. These keys can be recalled at any time by typing HELP _KEYS on the command line, or just type _KEYS and press . Also see the chapter "Using the Mouse and TOP Windows". HELP Key | Description -------------------------------------------------- F1 | Get HELP Using TOP 4-3 TNC Technology TOP Manual -------------------------------------------------- ALT-F1 | Clear HELP -------------------------------------------------- ESC | Clear current command line Customizing the HELP File TOP.HLP The help utility reads all its messages from a file called TOP.HLP, which must be located in the same directory that TOP was loaded from, or in other words, the same directory that TOP.EXE and TOP.INI is located in. The help file is ascii editable in the following format: [keyword] VersionNumber Help message text. The message text contained here must contain lines of less than 75 characters each (greater amounts are truncated). Each line ends with a carriage return line feed. Blank lines are OK. The message ends when a left square bracket is detected as the first character in a line, i.e. the start of the next message. Don't use more than 20 lines (more if you use EGA 43 or VGA 50 line mode) if you want the help message to fit all on one page. See the beginning of the included TOP.HLP file for more details. The [keyword] is replaced by the keyword you want the help utility to recognize, and must be enclosed in square [ ] brackets. The version number is a number like 3.2 and indicates the applicable DOS version. When TOP first reads the help file on start-up, only the highest version entries which are less than or equal to your current DOS version are retained. If no version is specified, the message will be used with all DOS versions. The entries do not have to be in any special order, although alphabetical by keyword and version is recommended for ease of maintenance. All DOS and TOP commands have help messages in the TOP.HLP file included in your release. Call TNC Technology for information regarding specialized help files, including foreign language support. The HISTORY Command Buffer TOP saves previously issued commands into a command history buffer every time a new command is issued. The contents of the buffer can be recalled, edited, and re-issued. The history buffer size is specified by the HistorySize entry in the [Initialize] section of TOP.INI. See the chapter, "Customization and TOP.INI" for more details. The maximum size of the history buffer is 32 Kbytes, or at least 256 full length command lines. Since the commands are packed end to end in the history buffer, many more than 256 commands can be stored if they are not all the maximum length of 127 characters each. If the history buffer is filled up, the oldest command is discarded before the new command is saved. The entire contents of the history buffer can be viewed, saved, initialized, and automatically saved to a file at the end of a session. In addition, the contents of the history buffer can be saved after every execution of a user specified number of commands by setting the HistoryAutoSaveCount entry in the Using TOP 4-4 TNC Technology TOP Manual [Initialize] section of TOP.INI. See the chapter, "Customization and TOP.INI" for more details. Simple Recall There are two ways to recall a previously issued command. To scroll up to older commands simply press the up arrow key. Repeated up arrow key presses scrolls older and older commands. The down arrow key reverses the scroll to newer commands. When you find the command you want, you can press enter to execute it exactly or edit it prior to execution. In addition, pressing the or keys recalls the oldest or newest command, respectively. For example, suppose you have just compiled a program you were working on with the following command: c:\>compile myprog.c /A /C /NO /F=3 You find out you have a compile error and you use your editor to fix it. When your finished, you push the up arrow key twice to recall the compile command and re-execute it without having to retype it. Search Recall Previous commands can also be searched for by typing a few letters of the command and hitting the key. The newest command containing the letter sequence will be instantly recalled. Repeated presses of the page up key will recall older and older commands containing the same letter sequence. A beep indicates no more matches remain. Page down will recall newer commands containing the same letter sequence. In the above example, the compile command could be recalled by typing c:\>comp or even c:\>og.c followed by the page up key. The search text is remembered even after a command is executed so a search can be continued or repeated. Just hit the page up key without typing any text and the previous search text will be used. When the command containing the search text is found, the search text is displayed with a user-defined attribute. The default attribute is reverse text, and can be changed by modifying the TOP.INI file's [Initialize] section. See the chapter, "Customization and TOP.INI," for more details. Pre-loading the History Buffer To pre-load the history buffer on startup, specify the file containing the desired history in the TOP.INI file's [Initialize] section. See the chapter, "Customization and TOP.INI," for more details. The file containing the initial history can be the history output file generated in the example above, or one of your own. To create a history file, use your favorite text editor to generate an ascii file containing a list of commands. Each command can be up to Using TOP 4-5 TNC Technology TOP Manual 128 characters, and ends with a carriage return. Examine or Save the History Buffer To examine the contents of the history buffer, just type history at the command prompt. To save the current history buffer, redirect the output to a file, for example: c:\>history > history.txt The above example saves the current history buffer contents to a file named history.txt. Saving a Command Without Execution A command can be added to the history buffer without execution by pressing . Saving the History Buffer On Exit The history buffer can be saved automatically whenever TOP is exited to the same file it was pre-loaded from by modifying the HistorySave entry in the TOP.INI file's [Initialize] section. See the chapter, "Customization and TOP.INI," for more details. Saving the History Buffer On Command Count The history buffer can be saved automatically to the same file it was pre- loaded from whenever TOP executes a user specified number of commands by modifying the HistoryAutoSaveCount entry in the TOP.INI file's [Initialize] section. See the chapter, "Customization and TOP.INI," for more details. HISTORY Key Summary The table below summarizes the HISTORY keys. These keys can be recalled at any time by typing HELP _KEYS on the command line, or just type _KEYS and press . HISTORY Key | Description -------------------------------------------------- Up Arrow | Recall next older command from the | history buffer -------------------------------------------------- Down Arrow | Recall next newer command from the | history buffer -------------------------------------------------- Page Up | Search for next matching older | history command -------------------------------------------------- Page Down | Search for next matching newer | history command -------------------------------------------------- F9 | Recall oldest saved command from | the history buffer Using TOP 4-6 TNC Technology TOP Manual -------------------------------------------------- F10 | Recall newest saved command from | the history buffer -------------------------------------------------- F5 | Save the current command line to | the history buffer but do not | execute it Enhanced Command Line Editing So you just recalled a long command from the history buffer, and now you wish you could change something? Try hitting the left arrow key. The cursor moves into the command line without removing characters! Finally you can see what you're editing. The enhanced command line edit features are available at any time, whether you have recalled a command from the history buffer, or you are in the process of entering a command. For example, lets say you wanted to set the mode of your com port, and you typed the following at the command line: c:\>mode com1 9600,M,8,2,P Before hitting , you press for help and find out the "M" is not a valid setting for parity. To fix the command line, just hit the left arrow key until the cursor is placed over the "M" and type "N". Now hit the key and the correct command is issued. Notice that even if you had issued the incorrect command, after getting bawled out by DOS you can recall the incorrect command using the up arrow key and still edit it the same way. Try it-it's easy! When editing a command line, notice the cursor takes on the shape and color you have defined in the [Video] section of TOP.INI. The cursor also changes shape to indicate which mode you are editing in, either overwrite or insert mode. The edit mode is toggled by hitting the key. Enhanced Editing Key Summary The table below lists the new enhanced edit key functions available with TOP. These keys can be recalled at any time by typing HELP _KEYS on the command line, or just type _KEYS and press . TOP Key | Description -------------------------------------------------- Left Arrow | Move cursor left into command line -------------------------------------------------- Right Arrow | Move cursor right within command | line, and/or recall characters from | the history buffer if available -------------------------------------------------- Insert | Toggle between overwrite and insert | edit modes -------------------------------------------------- Backspace | Delete the character to the left of Using TOP 4-7 TNC Technology TOP Manual | the cursor -------------------------------------------------- Delete | Delete the character at the cursor | position -------------------------------------------------- F2 | Copy history buffer characters to | up to and including the next | character you type after hitting F2 -------------------------------------------------- F3 | Copy history buffer characters to | end of line -------------------------------------------------- F4 | Skip history buffer characters to | up to and including the next | character you type after hitting F4 -------------------------------------------------- F6 | Enter a Control-Z character at the | cursor -------------------------------------------------- F7 | Move cursor left to the next | character you type after hitting F7 -------------------------------------------------- F8 | Move cursor right to the next | character you type after hitting F8 -------------------------------------------------- HOME | Move cursor to start of line -------------------------------------------------- END | Move cursor to end of line -------------------------------------------------- TAB | Insert a filename from the current | directory at the cursor. See | "Command Line Completion" later in | this chapter Multiple Commands on the Command Line Multiple commands can be placed on a single command line. To do so, commands must be separated by the command separator character specified in the TOP.INI file. The default command separator character is the caret (^). For example, the following command copies files from drive A to the root directory on drive C and then displays a directory of the root on drive C: c:\>copy a:*.txt c:\ ^ dir c:\*.txt A space is not required before and after the caret as in the above example, but may be added for clarity. Aliases One of the most powerful features of TOP, aliases are user-defined command sequences which can are assigned to a single word. Aliases are assigned using the ALIAS command, and are removed using the UNALIAS command. In addition, initial aliases can be defined in the TOP.INI file in the [Alias] section. Using TOP 4-8 TNC Technology TOP Manual The alias name and argument length is only limited by the size of the internal alias buffer, which is 64K bytes. All aliases names and their arguments must fit in this buffer. An alias may contain any command or combination of commands (using the command separator character). However, each individual command between the command separator is limited by the DOS command line length of 127 characters. Because of the DOS command line length limit of 127 characters, an alias whose total length is greater than 127 characters can only be specified in a file (see below) or in the [Alias] section of the TOP.INI. Aliases can be nested to any depth. Simple Aliases The simplest type of alias just assigns a new name to an existing command. For example, typing: defines an alias called list, which causes a directory to be displayed in date order. Adding Replaceable Parameters to Aliases Command line arguments can be added to aliases using the same syntax as in batch files. The above example could have been: alias list dir %1 | sort Then typing c:\>list *.txt would cause the %1 to be replaced by *.txt, causing list to produce a directory of files ending in "txt" displayed in date order. The special command line argument %* can also be added to aliases, which will be replaced by all command line arguments. Compound Aliases Aliases can also be used to execute multiple commands using the command separator character. For example, the alias definition alias qp pushd d:\qpro^qpro %1^popd defines the alias qp to mean "save the current directory, change directory to d:\qpro, run qpro with the file specified on the command line, then restore the directory to the original directory." Nested Aliases As mentioned earlier, aliases can be nested to any level. In other words, an alias can contain an alias (which may contain another alias, and so on). For Using TOP 4-9 TNC Technology TOP Manual example if the following aliases were defined: alias hello echo Hello alias likec hello^echo World! Typing likec at the command line would cause the message: Hello World! Nested aliases are particularly useful for breaking up long unwieldy alias definitions, or to add a repetitive routine to many other aliases Preventing Recursive Expansion (Alias Loop Errors) Aliases names are case sensitive, whereas DOS is not. You can use this feature to define aliases which are variations of themselves, or to redefine commands to have new meaning with the same name. For example, the alias definition: alias dir dir %1 /od would cause an error since the alias refers to itself. However, the alias definition: alias dir Dir %1 /od will cause the DOS command DIR to be invoked with the /od switch whenever dir is typed. Removing Aliases Aliases can be removed with the UNALIAS command. To remove the dir alias defined above, type: unalias dir Examining or Saving Aliases To examine the contents of the alias buffer, just type ALIAS at the command prompt. To save the current alias buffer, redirect the output to a file, for example: c:\>alias > alias.txt The above example saves the current alias buffer contents to a file named alias.txt. Note that aliases can be automatically saved whenever they are defined by setting the AliasAutoSaveFile entry in the [Initialize] section of your TOP.INI file. See the chapter, "Customization and TOP.INI," for further details. Pre-loading Aliases / Reading an Alias File Three methods are available to read in groups of aliases to pre-load or add aliases to the alias buffer. First, the TOP.INI file contains a section called Using TOP 4-10 TNC Technology TOP Manual [Alias] which is a list of initial aliases to be assigned at startup. See the chapter, "Customization and TOP.INI," for more details. This method is generally used by TNC Technology to release interesting alias suggestions since the TOP.INI file will be overwritten during installation. We therefore do not advise you store your aliases using this method. The second method of reading in aliases is to specify a filename using the AliasAutoSaveFile entry in the [Initialize] section of your TOP.INI file. See the chapter, "Customization and TOP.INI," for further details. Any aliases defined in this file will have precedence over those defined in the TOP.INI file. Also, this file will be updated anytime you define or remove an alias at the command line, lending a permanence to your definitions. The release TOP.INI file already has this parameter set, so no additional action is needed to use this method. Finally, groups of aliases can be read in by using the /r switch when typing alias, followed by a file name containing the list of desired alias definitions. For example, typing: alias /r alias.txt would append the aliases defined in the file alias.txt to the current alias buffer contents (and automatically update the AliasAutoSaveFile). Debugging Aliases Aliases, unlike batch files, always operate with echo off. If you find your alias is not operating correctly, and you can't see what's happening to figure it out, you can enable alias debug mode by typing: alias + This will cause TOP to briefly display the expanded alias and each line to be executed with command line parameters replaced just prior to execution as an aid to debugging. For example, using the alias likec we defined earlier with alias debug mode enabled would result in: ALIAS: likec = hello^echo World! ALIAS: hello = echo Hello EXEC: echo Hello Hello EXEC: echo World! World! To disable alias debug mode, type: alias - The CRON Program Scheduler One of the most innovative features of TOP, the CRON scheduler allows you to set up a schedule of programs to occur periodically some time in the future. All CRON events are set up using the TOP.INI file in the [Cron] section. Using TOP 4-11 TNC Technology TOP Manual Mandatory and Whimsical Entries All CRON entries in the TOP.INI file are only executed during the time the computer is otherwise idle and sitting at the command line waiting for input. In other words, a CRON entry will not be executed in the middle of your word processing session. To take advantage of this, there are two kinds of CRON entries, called mandatory and whimsical. A mandatory entry is an entry which will always be executed, either at the time it was scheduled, or, if the computer is not idle or even off at that time, at the next available idle time. A whimsical entry will only be executed if the computer is idle at the time scheduled in the entry. Use mandatory entries for jobs which must occur regardless of the time, such as backing up files to a network, or reminder messages. Use whimsical entries for events which are time sensitive, such as chimes on the quarter hour. How To Make A CRON Entry Each entry in the TOP.INI file consists of a time and date specification followed by the name of the program to be executed. The time specification is a sequence of numbers specifying the minute, hour, day-of-month, month, and day- of-week to run the program, in that order. Any of the time specifications can contain a single number, a range of numbers, a list of numbers, any combination of lists and ranges, or a wildcard (*). See the chapter, "Customization and TOP.INI," for more details. Either the day-of-month or the day-of week entry can be true for CRON to execute the entry. The time specification is then followed by the name of the program to be executed. Any valid program name or command is acceptable, but remember to specify the program path if it is not specified by your PATH environment variable. If the program name is preceded by an equals sign (=), the entry is whimsical, otherwise it is mandatory. This is really not as hard as it sounds, as some examples will illustrate: The above example would cause the message "Anniversary Today!" to be displayed every hour on the hour all day on June 12 (so you for sure don't forget it). 0 7 * * 1-5 getmail This example would cause your computer to run the program getmail at 7:00 am every weekday morning. Presumably you are not there to turn on the computer until 8:20 am. That's OK, since it is a mandatory job CRON will execute it then. 45 16 * * 5 backup c:\*.txt e: /s < echo Y Note: the above entry would be typed all on one line. This entry causes the DOS program BACKUP to be executed every Friday afternoon at 4:45 pm. It causes all files ending with .txt on drive c: to be backed up to network drive e: automatically. 0,15,30,45 * * * * =chime This entry causes the program chime to be run every quarter hour. However, Using TOP 4-12 TNC Technology TOP Manual since it is a whimsical entry, it will only be run if the computer is idle at that quarter hour. 0,30 * * * * history > c:\history.txt This entry causes the current history buffer to be saved to a file called history.txt every half hour. See also the chapter "Customization and TOP.INI," particularly the [Cron] section, for more details of a CRON entry. Displaying the Scheduled CRON JOBS To display the currently scheduled CRON jobs, just type CRON at the command prompt. To save the currently scheduled CRON jobs, redirect the output to a file, for example: c:\>cron > cron.txt The above example saves the currently scheduled CRON jobs to a file named cron.txt. Resetting the CRON Clock Using CRON NOW CRON remembers which job it is supposed to next execute by keeping an internal "last executed" time clock. A copy of the last executed time is also saved to the disk in the file specified by the CronTimeStamp entry in the [Initialize] section of TOP.INI. This is so CRON can maintain a schedule of jobs to be executed even through power off and boot times. The last executed time is updated only after completion of a CRON job. There are conceivable but rare situations where this is not desirable, for example if a CRON entry causes the computer to purposely be booted (as might happen if network drivers needed to be temporarily installed). Executing the command: c:\>cron now at the command line or in a CRON entry causes CRON to update its last executed clock to the current time, thus cancelling execution of any pending jobs and making CRON think it has completed the current job. Rebooting the computer at this point will now not cause that job to be re-executed. You may also want to use the CRON NOW command if you have just reset the time or date of your system clock to prevent jobs from being re-run. CRON Log Updates Every time a scheduled non-whimsical CRON job has completed execution, an entry will be appended to a log file giving you a dated record of scheduled jobs. The log file is specified by the CronLogFile entry in the [Initialize] section of TOP.INI. See the chapter, "Customization and TOP.INI," for more details. The time and date of execution, and a copy of the CRON schedule entry are continuously appended to this file, as well as the error code (if any) returned by the scheduled program. This enables you to verify if a job was completed successfully while you were not at your computer. Note: whimsical CRON jobs are Using TOP 4-13 TNC Technology TOP Manual not logged. Debugging CRON Entries Typing: CRON always operates with echo off. If you find your cron job is not operating correctly, and you can't see what's happening to figure it out, you can enable cron debug mode by typing: cron + This will cause TOP to briefly display the cron job just prior to execution as an aid to debugging. To disable cron debug mode, type: cron - Typing CRON with no parameters will display the currently scheduled jobs. Setting TOP's PROMPT: TOPPROMPT TOPPROMPT is an environment variable used to set a new system prompt for TOP. All the meta-string characters which are valid in the DOS PROMPT command are valid as well in the TOPPROMPT variable, except the DOS meta-string characters are now case sensitive. If the meta-string characters are capitalized the result will be capitalized, otherwise the result will be lower case. In addition, a few new meta-string characters have been added which TOP will recognize and process. See the TOPPROMPT meta-string summary below. Also, unlike the DOS PROMPT command, ANSI escape string sequences will be recognized and processed even if ANSI.SYS is not installed (a summary of ANSI escape sequences can be found in Appendix C). The TOPPROMPT string sequence is executed every time a new prompt is issued. A sample TOPPROMPT setting which uses the new meta-string characters and ANSI escape string sequences has been included in your initial TOP.INI file. TOPPROMPT can be set using either the SET or PROMPT command. For example: PROMPT $p$T$g sets TOPPROMPT to $p$T$q, which causes the current directory, then the current time followed by the > character to be displayed as your prompt. This is equivalent to: SET TOPPROMPT=$p$T$g The best place to put your prompt command is the [InitialCommands] section of TOP.INI. See the chapter, "Customization and TOP.INI," for more details. TOPPROMPT Meta-string Summary The table below contains a list of all valid TOPPROMPT meta-strings. Both lower Using TOP 4-14 TNC Technology TOP Manual and upper case letters are accepted, and will result in lower or upper case output (except t or T - see below). Meta- | Explanation string | -------------------------------------------------- $$ | The $ character -------------------------------------------------- $_ | A carriage return / line feed -------------------------------------------------- $b | The | character -------------------------------------------------- $d | The current date -------------------------------------------------- $e | ASCII code '1B' (the escape character) -------------------------------------------------- $g | The > character -------------------------------------------------- $h | A backspace -------------------------------------------------- $l | The < character -------------------------------------------------- $m | The time meridian (returns "am" or | "pm") -------------------------------------------------- $n | The current drive -------------------------------------------------- $p | The current directory of the current | drive -------------------------------------------------- $q | The = character -------------------------------------------------- $s | The current drive's available disk | space -------------------------------------------------- $t | The current time in 24 hour format -------------------------------------------------- $T | The current time in 12 hour format -------------------------------------------------- $v | The version number The above table is also available on line by typing HELP PROMPT. TOPTIME: The Time-Updated ANSI String TOPTIME is similar to TOPPROMPT in that it is an environment variable containing the same syntax of character strings, including the case sensitive DOS meta-strings, ANSI escape string sequences (a SUMMARY of ANSI escape sequences can be found in Appendix C), and the new TOP meta-strings in the table above. However, TOPTIME is re-executed every second, independent of the prompt. Naturally, this lends itself well to displaying the current time. A sample TOPTIME setting which does just that has been included in your initial TOP.INI file. Using TOP 4-15 TNC Technology TOP Manual TOPTIME can only be set using the SET command. For example: SET TOPTIME=$T$m sets TOPTIME to $T$m, which causes the current time in 12 hour format followed by the time meridian to be displayed every second. TOPDMT: Automatic Time-out Execution TOPDMT is used to specify the name of the program to be executed when the KeyboardTimeout time specified in the [Initialize] section of TOP.INI is satisfied. TOPDMT must contain a valid executable program, including path definition if required. Any user program can be specified by TOPDMT and it will automatically be started after the idle time specified elapses (idle time is when your computer is doing nothing else - i.e. when no programs are running and the prompt is displayed). A typical program to be started is a "screen saver", or something which temporarily blanks the screen and displays an interesting picture instead. Several such programs have been included with your TOP release. See also KeyboardTimeout in the [Initialize] section of TOP.INI for more details. Also see Appendix D, "Using DMTs". Keystroke Functions (FKEY) Keystroke functions are user-defined command sequences which can are assigned to a single keystroke. Keystroke functions are very similar to aliases and can contain all the command and features that aliases use. The only difference between aliases and keystroke functions is the keystroke function is pressed after the arguments are typed on the command line - like calculator functions. Keystroke functions are assigned using the FKEY command, and are removed using the UNFKEY command. In addition, initial aliases can be defined in the TOP.INI file in the [FunctionKeys] section. The keystroke function name and argument length is only limited by the size of the internal function key buffer, which is 64K bytes. All keystroke function names and their arguments must fit in this buffer. Like aliases, a keystroke function may contain any command or combination of commands (using the command separator character). However, the total length of a keystroke function must be less than 127 characters. If a longer keystroke function is desired, first define an alias and assign it to a keystroke function. Keystroke functions cannot be nested, but may contain aliases which are nested. Keystroke functions can be assigned to the keys F1 through F12, AltF1 through AltF12, CtrlF1 through CtrlF12, ShiftF1 through ShiftF12, Alt0 through Alt9, and AltA through AltZ. Note that assigning a keystroke function to any of F1 through F10 will supersede the default command line edit function for that key. Adding Keystroke Functions Keystroke functions are added in much the same way as aliases. For example, typing Using TOP 4-16 TNC Technology TOP Manual defines the function key F12 to cause a directory listing to be displayed listed in date order. A replaceable parameter was included in the above example. Typing: c:\>*.txt would produce an date order directory of files ending in .txt. Pre-loading Keystroke Functions / Reading a File Three methods are available to read in groups of keystroke function definitions to pre-load or add to the keystroke function buffer. First, the TOP.INI file contains a section called [FunctionKeys] which is a list of all initial keystroke functions to be assigned at startup. See the chapter, "Customization and TOP.INI," for more details. This method is generally used by TNC Technology to release interesting keystroke function suggestions since the TOP.INI file will be overwritten during installation. We therefore do not advise you store your keystroke functions using this method. The second method of reading in keystroke functions is to specify a filename using the FkeyAutoSaveFile entry in the [Initialize] section of your TOP.INI file. See the chapter, "Customization and TOP.INI," for further details. Any keystroke functions defined in this file will have precedence over those defined in the TOP.INI file. Also, this file will be updated anytime you define or remove a keystroke function at the command line, lending a permanence to your definitions. The release TOP.INI file already has this parameter set, so no additional action is needed to use this method. Finally, groups of keystroke functions can be read in by using the /r switch when typing fkey, followed by a file name containing the list of desired alias definitions. For example, typing: fkey /r function.txt would append the keystroke functions defined in the file function.txt to the current keystroke function buffer contents (and automatically update the FkeyAutoSaveFile). Removing Keystroke Functions Keystroke functions can be removed with the UNFKEY command. To remove the F12 keystroke function defined above, type: unfkey F12 Examining or Saving Keystroke Functions To examine the contents of the keystroke function buffer, just type FKEY at the command prompt. To save the current keystroke function buffer, redirect the output to a file, for example: c:\>fkey > function.txt Using TOP 4-17 TNC Technology TOP Manual The above example saves the current keystroke function buffer contents to a file named function.txt. Automatically Maintaining Colors TOP automatically maintains DOS foreground, DOS background, and cursor color as well as the current color palette. The colors are specified in the [Video] and [Palette] sections of TOP.INI. See the chapter, "Customization and TOP.INI," for more details on setting colors. Recursive Commands TOP provides three new commands recursive through directories called MOVE, XDIR, and XDEL. Like DOS XCOPY, these commands provide file manipulation functions across all or selected directories. MOVE MOVE is used to move or rename files, directories and directories containing subdirectories. MOVE is much faster than COPY since only the location of the files is changed; the files are not actually moved on the disk unless you specify a MOVE to another drive. The action taken by MOVE depends on the file parameters specified. If source and destination are on the same disk, the files are moved. Otherwise the source is copied to the destination disk, and the source is removed. The action taken by MOVE also depends on the type of file parameters specified. If the source parameter is a file specification, then only files are moved. If the source is a path specification, then whole directories are moved. If a destination is a directory and it does not exist, MOVE will create it for you (after confirmation). A few examples should make this clear. To rename a file, source and destination are at the same path level: c:\>move result.txt report.doc The above example just renames the file result.txt to report.doc, unless report.doc already exits (otherwise confirmation will be requested to delete and replace report.doc). To move a file to another directory: c:\text>move result.txt \wp The above example moves the file result.txt to the directory \wp if \wp exits, otherwise \wp is created for you first (after confirmation). Wildcards are accepted in the source, if the destination is a directory. If a wildcard operator had been specified in the previous example, such as: c:\text>move *.txt \wp Using TOP 4-18 TNC Technology TOP Manual all files matching *.txt in \text would be moved to \wp if \wp exits, otherwise \wp is created for you first (after confirmation). To rename a directory, source and destination are at the same path level: c:\>move \text \wp would just rename the directory \text to \wp if \wp did not already exist (if \wp did exist then \text and all files and directories in it would be moved there), but typing: c:\>move \text \wp\text would move the entire contents of the \text directory to the subdirectory \wp\text contained in \wp, (and/or create the \wp\text directory first if it did not exist after confirmation). If a destination file exists, a confirmation is requested to delete it before the move occurs. However, the switch /NOCONF causes MOVE to overwrite existing destinations without confirmation. USE WITH CARE! Using /NOCONF does not disable confirmation if a new directory is to be created. MOVE normally displays each file name as it is moved. If you do not want to see each filename displayed, for example if MOVE were part of an ALIAS command, the /Q switch can be used. /Q runs MOVE quietly, with only summary information echoed to the display. MOVE normally verifies each file move with the DOS write verify function if verify is set to on. TOP will perform additional verification before deleting the source files if a /V switch is included. Including /V will cause MOVE to take slightly longer, but will provide an extra measure of confidence that files were written or moved properly. MOVE also accepts the /! switch (as do many TOP functions), which will cause all BUT the specified files to be moved. For example, c:\>move *.txt \wp\other /! will cause all files except those ending in txt in the current directory to be moved to the directory \wp\other. MOVE normally does not move hidden files. Including the /H switch will allow MOVE to move hidden files as well. Disk space is never a problem when moving files within a drive since they fit in the first place, but if MOVE runs out of space when moving across drives it will exit. XDEL XDEL is used to delete a file or group of files in a specified path and all subpaths. XDEL can even delete an entire directory and all files and subdirectories in it. USE THIS FEATURE WITH CARE!! Using TOP 4-19 TNC Technology TOP Manual The action taken by XDEL depends on the type of file parameters specified. If the parameter is a file specification, then only files are deleted. If the file parameter is a path specification, then whole directories are deleted. XDEL can accept multiple file parameters and will act on them individually depending on what type they are. XDEL is used like DOS DEL, except the parameter specified may also be a directory. XDEL always deletes all matching files in the directory specified and in all subdirectories of that directory. If you only want to delete the one file you are specifying, do not use XDEL, use DEL. For example: c:\>xdel \*.bak would cause all files matching *.bak to be deleted from the entire drive. XDEL also accepts multiple parameters. Fore example typing: c:\>xdel \*.bak \*.tmp would cause all files matching *.bak and *.tmp to be deleted from the entire drive. The scope of XDEL in the previous examples was the entire drive since it was executed from the root directory with no path specification. If instead the following were typed: c:\>xdel \text\*.bak or c:\text>xdel *.bak then XDEL would delete all files matching *.bak in the directory \TEXT and all files matching *.bak in all subdirectories of \TEXT. Finally, typing: c:\>xdel \text would delete the directory \TEXT and all files and subdirectories in it. Normally, XDEL will not delete read-only files. However, if the switch /R is included with the XDEL command, read-only files will be deleted as well. XDEL normally displays each file name as it is deleted. If you do not want to see each filename displayed, for example if XDEL were part of an ALIAS command, the /Q switch can be used. /Q runs XDEL quietly, with only summary information echoed to the display. /Q will also make XDEL run considerably faster since files will be deleted in blocks instead of individually. Because of the potential for deleting many files in one stroke, XDEL never proceeds without echoing what you asked for and asking for confirmation. However, the switch /NOCONF causes XDEL to proceed without confirmation. USE THIS FEATURE WITH EXTREME CARE!! XDEL also accepts the /! switch (as do many TOP functions), which will cause all BUT the specified files to be deleted. For example, Using TOP 4-20 TNC Technology TOP Manual c:\>xdel \temp\*.zip /! will cause all files except those ending in zip to be deleted in the directory \temp and its subdirectories. Needless to say this feature is powerful, but potentially can delete a large number of files. USE THIS FEATURE WITH CARE! XDEL normally will not delete hidden, read only, or system files. Including any or all of the switches /H, /R, or /S will allow XDEL to delete hidden, read only, or system files, respectfully. USE THIS FEATURE WITH CARE! XDEL also accepts a /P switch, which will cause XDEL to pause and ask for confirmation before deleting each file specified. Use of /P overrides /Q or /NOCONF. XDIR XDIR will list (or find) all or specified directory entries in a path and all its subpaths. XDIR is used like DOS DIR, except the files displayed will be from the specified directory and all subdirectories. For example: c:\>xdir \*.txt will list all files matching *.txt on the entire drive. Including the \ above insures the root directory is searched, even if this were not your current directory. This can be particularly useful if you were trying to find a file ending in .txt but you didn't know where it was. The action taken by XDIR depends on the type of file parameters specified. If the source parameter is a file specification, then all matching files are displayed. If the source is just a path specification, then directories and subdirectories are displayed. For example, typing: c:\>xdir \wp\*.* will list all files in the directory \wp and in its subdirectories. However, typing: c:\>xdir \wp will list all subdirectories in the directory \wp. This is particularly useful in conjunction with the /V switch (see below). XDIR will list matching files with their complete path names, or just directories if only a path is specified. If the /V (verbose) switch is included, XDIR also displays file date and size. This is particularly useful when displaying only directories as the file usage will be displayed for each directory. Typing: c:\>xdir \ /V| sort /r | view will produce a list of all directories on your drive, sorted by file space usage, displayed in the TOP view window. Try it! The above example makes a great alias too. Using TOP 4-21 TNC Technology TOP Manual XDIR also accepts the /! switch (as do many TOP functions), which will cause all BUT the specified files to be displayed. For example, c:\>xdir \temp\*.zip /! will cause all files except those ending in zip to be listed. XDIR normally displays all but hidden files. Using the /H switch will allow display of hidden files as well. Two other switches are available for XDIR, /P and /Q. /P will pause the screen display when full, and /Q runs quietly, displaying only summary information to the display Examine File Contents: VIEW VIEW displays the contents of any file in a TOP window. Unlike using type, the VIEW is a TOP window function and can be scrolled, sized, and moved. As with any TOP window, right mouse clicks or drags can highlight any displayed text for subsequent pasting to the command line or other windows. VIEW can be started by selecting VIEW from the mouse pop-up chord menu. The filename to be VIEWed can be dragged into the VIEW window (using the left mouse button) from either the FILES or LIST window (see the chapter "Using the Mouse and TOP Windows"). Alternatively, VIEW can be started by typing: view [filename] at the command prompt. The VIEW window's initial position, initial size, initial state (on or off), and use of colors is controlled by modifying the [ViewWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. Piping into VIEW Program output can be piped to VIEW using the DOS pipe symbol (|). You can then VIEW the output from your program at leisure by scrolling the VIEW window. For example, typing: dir | view will pipe the output from dir into the view window. Change Drive and Directory: CDD CDD changes or displays the current drive and directory simultaneously. It is equivalent, but faster and more convenient than the two commands CD and d:. For example: c:\>cdd d:\qp changes the drive to drive D: and the current directory on D: to \QP. Typing CDD with no parameters just displays the current drive and directory. Using TOP 4-22 TNC Technology TOP Manual Save and Recall the Current Directory: PUSHD, POPD PUSHD is used to push (save) the current drive and directory into a directory stack and optionally change the current drive and directory at the same time. It is used in conjunction with POPD, which returns the drive and directory to the state saved with PUSHD. For example: c:\wp>pushd d:\spreadsh\wk d:\spreadsh\wk> Some time later type: d:\spreadsh\wk>popd c:\wp> If no drive or directory is specified, PUSHD will just push the current directory without changing directories. The directory stack saved with PUSHD is restored by POPD on a last in first out basis. To display the current directory stack, use the TOP command DIRS. There is virtually no limit to the number of directories that can be saved with PUSHD (it depends on the length of the path saved, but several hundred at least). Extended VGA Modes So you own a super VGA card. You read the manual, it said you have all kinds of extended text modes you can run it in. You switched into one of them, maybe the 132 column by 43 row mode. What happened? You typed dir and it started scrolling at the 25th line! The sad fact is, most DOS utilities have that 25 line parameter hard coded in, so they will never work with those extended modes you paid extra to have. So what to do? Ask the little guy in the margin! TOP not only fully supports all extended VGA text modes of most popular super VGA cards, but maintains the mode of your choice even when other programs you run reset it. Using these modes is quite simple. Using TOP's setup utility, TOPSU, change the VideoMode entry in the [Video] section (see the chapter "Customization and TOP.INI" for more details). The mode you select will be maintained permanently while TOP is in control. If you have already been using some form of EGA 43 line or VGA 50 line mode, using DOS 4.0+ and the MODE command, you must know that DOS requires ANSI.SYS to be loaded to support these modes. TOP does not require ANSI.SYS to run in these modes and if there is no other reason for ANSI.SYS you can optionally remove it from your CONFIG.SYS file. Since TOP does not require ANSI.SYS for anything else, including complete support of complex ANSI prompt strings, you might as well remove it and consequently save some additional memory. For extended VGA modes, see the file README.VGA that came with your release for Using TOP 4-23 TNC Technology TOP Manual up to date information on mode numbers and capabilities of your particular video card. For extended VGA modes, DOS's ANSI.SYS must be removed as it does not support any extended VGA modes. Again, TOP fully supports these modes and it is unlikely you will need ANSI. If you absolutely have to have ANSI.SYS loaded, you cannot use the extended VGA modes, but you can still take advantage of EGA 43 or VGA 50 line modes. See the chapter "Customization and TOP.INI" for more details. Finally a way to use those extended modes! Handling Programs Lacking VGA Support Amazingly, even though VGA extended modes have been around a fairly long time, there are still a lot of applications around that do not take advantage of them. Many older programs even have the same problem as DOS in that they assume your screen is in a 25 line text mode and when they start up, they do not verify or set it! To help you solve this problem, TOP includes a fast video mode setting utility, called VIDEO, which you can use to quickly set the mode prior to running these programs. Since TOP always restores the mode after any program is run, you must include the VIDEO command in a compound command, alias, fkey, or batch file. For example, suppose you find your favorite editor only seems to work in a 25 line mode. You might type: c:\>video co80 ^ editor Or you could define an alias, called ed: c:\>alias ed video co80^editor %* and always start your editor using the alias. Using Multiple Parameters With Commands Many TOP commands accept multiple file parameters allowing you to group otherwise unrelated commands into a single command. The commands which accept multiple parameters are ATTRIB, DEL, DIR, ERASE, XDEL, and XDIR. For example, typing dir *.txt *.doc will list all files ending with txt and all files ending with doc. Using Enhanced Wildcards Wildcards are used to specify a group of related files so you don't have to use the same command repeatedly for each filename in the group. Wildcards are special characters which act as a substitute for other characters in a filename or extension. There are two such characters: The * character represents any number of characters, including NO characters, one character, two characters, etc. Using TOP 4-24 TNC Technology TOP Manual The ? character represents exactly ONE character. However, DOS only recognizes one * in the filename, and one in the extension. Any characters typed after the * are ignored. This can lead to confusing and unexpected results. Luckily, all TOP commands accept "enhanced" wildcards. Enhanced wildcards are considerably more flexible than DOS wildcards and do not have the limitations described above. For example: dir *r*.* Will list all files containing an r anywhere in the name in the current directory. In contrast, given the example above, DOS would ignore the filename characters after the first * and therefore list ALL files. More examples: del *.txt would delete all files ending in txt in the current directory. attrib my*.* -r would clear the READ attribute from all files starting with my in the current directory. dir *.*q* would list all files with a q in the extension (DOS would just list ALL files). del *my*.?? would delete all files with my anywhere in the filename and which had exactly two characters in the extension (DOS would delete ALL files with exactly two characters in the extension) NISTIME NISTIME is a utility which uses your Hayes(tm) compatible modem to dial the National Institute of Standards and Technology's (NIST) Automated Computer Time Service (ACTS), retrieves the time and date, and sets your PC clock. A proprietary algorithm was employed to synchronize the PC's clock as precisely as possible resulting in a typical setting error of less than +/-1 ms. This utility is controlled by modifying the [Nistime] section in TOP.INI. See the [NISTIME] section of the chapter "Customization and TOP.INI" for more details on changing the setup for NISTIME. After modifying the appropriate settings in your TOP.INI file (to indicate choice of com port and etc.), to use NISTIME just type: c:\>nt (nt is a supplied example alias which calls NISTIME with the appropriate path specification). NISTIME reports its progress as it dials ACTS, then sets your PC's clock. Using TOP 4-25 TNC Technology TOP Manual Automatic Command Line Completion While typing at the command line, pressing the key will insert a filename from the current directory at the cursor. Repeated presses will alphabetically cycle through all files in the directory, or will reverse alphabetically cycle. If the cursor is on a partly typed filename or file specification using wildcards, repeated presses will cycle through a list of matching files in the current directory. Since TOP must first read in all files to sort them at the first press of the key, you may notice a slight but perceptible delay if you are in a directory containing an enormous number of files. Using TOP 4-26 ################################################################################ ################################################################################ Chapter 5 Using the Mouse and TOP Windows ################################################################################ ################################################################################ TNC Technology TOP Manual Using the Mouse and TOP Windows Many TOP commands are conveniently available through the use of your mouse. Your mouse must be Microsoft(tm) compatible and have at least two buttons (if your mouse has more buttons, only the left most and right most buttons will be used). A Microsoft(tm) mouse compatible driver must be loaded and running. While a mouse is not absolutely necessary to use TOP, the power it unleashes makes it highly recommended! A Short Discussion on Mouse Clicks No, they're not small groups of "in" mice. TOP recognizes five kinds of mouse button actions, which will be defined here and used though this section. The mouse actions are summarized in the table below. Mouse | Definition Action | -------------------------------------------------- Click | Quickly press and release a mouse | button -------------------------------------------------- Press | Press and hold a mouse button -------------------------------------------------- Drag | Press and hold a mouse button, then | move the mouse -------------------------------------------------- Double | Quickly press and release a mouse Click | button twice in succession -------------------------------------------------- Chord | Press and hold both the LEFT and | RIGHT mouse button together The above will usually be preceded by the word "Left" or "Right" meaning the left or right mouse button, respectively. TOP Mouse Commands Since by now you've probably started TOP, you've already noticed that there's a live mouse cursor on your screen. The mouse is used in two primary ways: To operate TOP window functions, and to cut and paste text from anywhere on the screen to the command line. These two functions have been divided up between the left and right mouse buttons. The table below summarizes the mouse commands available at any time: Mouse | Left Button | Right Button Action | In general: Used | In general: | to operate windows;| Selects any | used to copy | visable text from | selected text | anywhere on the | between windows | screen | and/or to the | | command line | --------------------------------------------------- Using the Mouse and TOP Windows 5-2 TNC Technology TOP Manual Click | Select a window | Highlight the word | function option. | under the mouse | See "TOP Window | cursor. Use a Left- | Functions - | Drag to copy the | General Usage" | highlighted word | below. Also moves | to a window or the | the command line | command line | cursor | --------------------------------------------------- Drag | Drag window | Controlled | selection or right | highlight (drag | button highlight | mouse cursor over | to the command | any desired screen | line or to another | text). Use a Left- | window | Drag to copy the | | highlighted text | | to a window or the | | command line --------------------------------------------------- Double | Select a window | Highlight the word Click | option, paste it | under the mouse | to the command | cursor, paste it | line at the cursor,| to the command | and immediately | line at the cursor, | execute the | and immediately | resulting command | execute the | line | resulting command | | line --------------------------------------------------- Chord | Pop up the window control menu. Menu | choices are: CloseAll, SaveLayout, | Alias, Files, History, List, View, and | Help. To select an item, move the mouse | over the item desired and release the | chord. The above table can be accessed online by typing HELP wMOUSE, or just type wMOUSE and press . All HELP for TOP mouse and window functions generally start with a little w. While the above table may at first seem complicated when read, it cannot be overemphasized how simple and convenient it will seem in practice! The Chord Pop-Up Menu Chording the mouse (see table above) brings up a pop-up menu containing the following window function choices: CloseAll, SaveLayout, Alias, Files, History, List, View, and Help. The chord pop-up menu is global, in other words it is always available when TOP is running, and it affects all functions equally. The table below explains the chord pop-up menu functions: Pop-up | Explanation menu item | ------------------------------------------------- Using the Mouse and TOP Windows 5-3 TNC Technology TOP Manual CloseAll | Closes all TOP window functions ------------------------------------------------- SaveLayout| Save the position and size of all | TOP windows ------------------------------------------------- Alias | Opens the ALIAS window, or brings it | to the top ------------------------------------------------- Files | Opens the FILES window, or brings it | to the top ------------------------------------------------- History | Opens the HISTORY window, or brings | it to the top ------------------------------------------------- List | Opens the LIST window, or brings it | to the top ------------------------------------------------- View | Opens the VIEW window, or brings it | to the top ------------------------------------------------- Help | Opens the HELP window, or brings it | to the top TOP Window Functions TOP window functions are simple, convenient ways to speed up and simplify access to or creation of your commands. For example, HELP is a TOP window function. Other TOP window functions are ALIASES, FILES, HISTORY, LIST, and VIEW, all described below. General Usage This section describes the common features of all TOP window functions and how to use them. Specific information for individual TOP windows is presented later in this chapter. All TOP window functions can be started with the chord pop-up menu (see above), and can be cancelled by clicking the left mouse button on the close box in the upper left corner of each window (the small square dot enclosed in square brackets). Once opened a window will remain open until it is closed, or it can close itself (autoclose) when a command is executed. The choice to autoclose is made in the appropriate section of TOP.INI. See the chapter "Customization and TOP.INI" for more details. TOP windows can be moved and sized. To move a window, place the mouse cursor anywhere on the title bar and press the left button. Move the window to the desired location and release the mouse. To size a window, place the mouse cursor anywhere on the window's boarder or corner and press the left button. Stretch the window to the desired size and release the mouse. The new position and size can be permanently saved using the SaveLayout command from the chord pop-up menu. TOP windows can also be maximized, or made as big as the screen will allow, by clicking the left mouse button on the maximize box in the upper right corner of Using the Mouse and TOP Windows 5-4 TNC Technology TOP Manual the window (the small up and down arrow enclosed in square brackets). Pressing the maximize box again after a window is full size will return the window to its former size. When all items to be displayed do not fit in a TOP window, scroll bars are activated on the right and/or bottom side of the window. The scroll bar consists of small up and down or left and right arrows, and a relative position indicator. The scroll bars are actuated with the left mouse button in two ways: pressing or clicking on the arrows scrolls the text up or down a line at a time; dragging the left button on the relative position indicator moves the view directly to that relative point. A click on any place in a window not associated with any other function (such as the boarder or background) brings that window to the front if it is partly obscured by any other window. A window can also be brought to the front at any time by reselecting it from the chord pop-up menu. All TOP windows have an associated section in the TOP.INI file which controls their initial position, initial size, initial state (on or off), autoclose ability, and use of colors. See the chapter "Customization and TOP.INI" for more details. Using TOP Windows Without a Mouse A keyboard interface is available to let you use TOP windows if you do not have a mouse. The keys are shown in the table below: Key | Function -------------------------------------------------- | Change active window | (highlights title) -------------------------------------------------- | Close active window -------------------------------------------------- | Scroll active window up | one page -------------------------------------------------- | Scroll active window | down one page -------------------------------------------------- | Scroll active window to | top -------------------------------------------------- | Scroll active window to | bottom -------------------------------------------------- | Scroll active window | left -------------------------------------------------- | Scroll active window | right -------------------------------------------------- | Scroll active window up -------------------------------------------------- Using the Mouse and TOP Windows 5-5 TNC Technology TOP Manual | Scroll active window | down The "active" window is the window in the front, and will be indicated by a highlighted title. Keyboard users do not have access to the Alias, Files, History, or List windows. Moving Selections Between Windows and the Command Line In addition to dragging text or selections from any window to the command line, some TOP windows also accept selections from the screen or other windows. In other words, you can drag selections into a window as well as out of a window. The table below summarizes the relationship between all TOP windows. Window | Imports | Exports | (dragged into) | (Left button | | select) ---------------------------------------------------- ALIAS | none | Command ---------------------------------------------------- FILES | none | File name with | | complete path ---------------------------------------------------- HELP | Help topic | Any word ---------------------------------------------------- HISTORY | none | Command ---------------------------------------------------- LIST | Path | File name | specification | without path ---------------------------------------------------- VIEW | File name | Line in file If a selection is already highlighed and the window is selected from the chord pop-up menu, it is equivelent to dragging the selection into that window. ALIAS Window Selecting ALIAS from the chord menu brings up the ALIAS window containing a list of all currently defined aliases. While this window is active, a left click on any item in the window selects that item for export. A left drag copies the selected item to the command line at the command cursor or to any other TOP window. In addition, a left double click on any item will select the item, copy it to the command line at the command cursor, and execute the resulting command line in one action. The ALIAS window can be moved and sized (see "TOP Window Functions - General Usage"). Left clicking the close box will cancel the ALIAS window. The ALIAS window's initial position, initial size, initial state (on or off), autoclose function, and use of colors is controlled by modifying the [AliasWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. Using the Mouse and TOP Windows 5-6 TNC Technology TOP Manual FILES Window Selecting FILES from the chord menu brings up the FILES window containing an alphabetical list of files, file information, directories, and file extensions for the current directory. While this window is active, a left click on any file in the window selects that item. A left drag copies the selected filename (and its full path specification) to the command line at the command cursor or to any other TOP window. In addition, a left double click on any file will select the file, copy the filename to the command line at the command cursor, and execute the resulting command line in one action. Pull-down menus are available in the FILES window to change drives or change file sort order. The pull-downs are actuated with a left press; release the button on the desired selection. To change directory or display filter, left click on the desired directory or filter in the Dirs or Types area of the FILES window. The FILES window can be moved and sized (see "TOP Window Functions - General Usage"). Left clicking the close box will cancel the FILES window. The FILES window initial position, initial size, initial state (on or off), autoclose function, and use of colors is controlled by modifying the [FilesWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. HISTORY Window Selecting HISTORY from the chord menu brings up the HISTORY window containing a list of all the items currently in the command history buffer. While this window is active, a left click on any item in the window selects that item. A left drag copies the selected item to the command line at the command cursor or to any other TOP window. In addition, a left double click on any item will select the item, copy it to the command line at the command cursor, and execute the resulting command line in one action. The HISTORY window can be moved and sized (see "TOP Window Functions - General Usage"). Left clicking the close box will cancel the HISTORY window. The HISTORY window's initial position, initial size, initial state (on or off), autoclose ability, and use of colors is controlled by modifying the [HistoryWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. LIST Window Selecting LIST from the chord menu brings up the LIST window containing a directory and files listing of the current directory. While this window is active, a left click on any item in the window selects that item. A left drag copies the selected item to the command line at the command cursor or to any other TOP window. In addition, a left double click on any item will select the item, copy it to the command line at the command cursor, and execute the resulting command line in one action. If the item you left double clicked on was a directory, the current directory is changed to that one and a new list is Using the Mouse and TOP Windows 5-7 TNC Technology TOP Manual displayed. Also, if a directory path specification is dragged into the LIST window, the current directory is changed to the dragged specification. The LIST window can be moved and sized (see "TOP Window Functions - General Usage"). Left clicking the close box will cancel the LIST window. The LIST window's initial position, initial size, initial state (on or off), autoclose ability, and use of colors is controlled by modifying the [ListWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. VIEW Window Selecting VIEW from the chord menu invokes the VIEW window, which displays the contents of a file. The filename to be VIEWed is dragged into the window from the FILES or LIST window with the LEFT mouse button. Alternatively, VIEW can be started by typing: view [filename] at the command prompt. VIEW can also be started as a result of a pipe operation, as in: dir | view which would cause the output from the dir command in the VIEW window. As in any window, right clicks or drags can highlight any text for subsequent pasting to the command line at the command cursor or to any other TOP window. The VIEW window can be moved and sized (see "TOP Window Functions - General Usage"). Left clicking the close box will cancel the VIEW window. The VIEW window's initial position, initial size, initial state (on or off), autoclose ability, and use of colors is controlled by modifying the [ViewWindow] section in TOP.INI. See the chapter "Customization and TOP.INI" for more details. HELP Window Selecting HELP from the chord menu invokes the HELP window (identical to pressing ). After the HELP window is activated, repeated left clicks will change HELP context to the text at the mouse position (especially useful on "See Also" text, but works on any word displayed). HELP window topics can also be seen or changed by dragging the topic into the HELP window from another window or the screen using the Left mouse button. The HELP window can be moved and sized (see "TOP Window Functions - General Usage"). However, when a new topic is selected, the HELP window will automatically resize itself to fit the topic. Left clicking the close box or pressing will cancel the HELP window. The HELP window's initial state (on or off), autoclose ability, and use of colors is controlled by modifying the [HelpWindow] section in TOP.INI. See the Using the Mouse and TOP Windows 5-8 TNC Technology TOP Manual chapter "Customization and TOP.INI" for more details. Using the Mouse and TOP Windows 5-9 ################################################################################ ################################################################################ Chapter 6 Customization and TOP.INI Note: This chapter was not inluded in the shareware release to conserve space. However, the entire contents of this chapter are available on line when using TOP's setup utility, TOPSET (included). The complete printed manual is included with your registration. ################################################################################ ################################################################################ ################################################################################ ################################################################################ Chapter 7 TOP Command Reference Note: This chapter was not inluded in the shareware release to conserve space. However, the entire contents of this chapter are available on line when using TOP's HELP utility. The complete printed manual is included with your registration. ################################################################################ ################################################################################ ################################################################################ ################################################################################ Appendix A Technical Support ################################################################################ ################################################################################ TNC Technology TOP Manual Technical Support Information Technical support is available to all registered users in many forms. Please feel free to use the service of your choice: Problem resolutions are usually posted within 48 hours. US Mail TNC Technology Attn: Technical Support 1084 Webster Road Webster, New York 14580 Voice 716-872-1377 (after 6pm EST, M-F) Machine attended during the day. BBS 716-872-4913 (8-N-1) 24 hrs. FAX 716-872-1377 Press "7" after answer CompuServe 70403,2351 Checked Daily Technical Support A-2 ################################################################################ ################################################################################ Appendix B Sample TOP.INI File Note: This chapter was not inluded in the shareware release to conserve space. However, the entire contents of this chapter are available on line when using TOP's setup utility, TOPSET (included). The complete printed manual is included with your registration. ################################################################################ ################################################################################ ################################################################################ ################################################################################ Appendix C Using ANSI ################################################################################ ################################################################################ TNC Technology TOP Manual Using ANSI This appendix explains ANSI escape sequences and how to use them. Also explained is how to install ANSI.SYS, which enables DOS to use ANSI escape sequences (more explanation below). However, ANSI.SYS is NOT required to be installed for TOP. TOP completely emulates ANSI escape sequences in it's prompt statement WITHOUT having ANSI.SYS loaded! If the only reason you have ANSI.SYS loaded is to produce better prompts, you can remove it and save memory. ANSI.SYS is an installable device driver that was included with your DOS release. When installed, ANSI lets you use special escape sequences which give you more control over video graphics mode and cursor movement. Normally ANSI is used to enhance your prompt. An ANSI escape sequence is a series of characters developed by the American National Standards Institute (ANSI); the series always begins with the escape character (ascii code 1B hex ). These escape sequences are how you go about using ANSI. Installing ANSI.SYS Remember, ANSI.SYS is NOT required for TOP's prompt. If you must install ANSI.SYS for other reasons, include the following line in your config.sys: device=[d:][path]ANSI.SYS [/X] [/K] Where: [d:][path] specifies the drive and directory that contains ANSI.SYS /X (DOS 4.0+ only) allows expanded keys on 101-key keyboards to be remapped independently. /K (DOS 5.0+ only) ignores expanded keys on 101-key keyboards You must boot the computer after modifying config.sys for the changes to take effect. Using ANSI To use ANSI escape sequences, first you must have some way to generate an escape and the subsequent series of characters which define the desired ANSI function, then you must issue the sequence via DOS function calls which use standard input or standard output. A perfect example of such a DOS function call is the command PROMPT. As you may recall, PROMPT issues a sequence of characters to standard output every time the key is pressed. PROMPT also recognizes its own special character sequences, called meta-strings, which enable PROMPT to issue funny characters like escape. Starting to sound suspiciously like a way to issue an ANSI escape sequence isn't it? The PROMPT meta-string for escape is $e, so to include an ANSI escape sequence in your prompt, you would include the sequence: ...$e[ANSI sequence]... Using ANSI C-2 TNC Technology TOP Manual For example, the following PROMPT command saves the cursor position, moves to the top of the screen, prints "Hi!", returns the cursor to its original position, outputs the current directory, and outputs the > character (do not put spaces in the sequence, they were included only to show the individual commands): See ANSI Escape Sequences below for a more detailed explanation of the ANSI sequences themselves (and the chapters "Using TOP" and TOP Command Reference" for more information on the PROMPT command). ANSI Escape Sequences Each ANSI escape sequences is in the following form: ESC[ parameters COMMAND Where: ESC represents the escape character parameters can be one or more of: n, a numeric parameter specified with ASCII digits s, a numeric parameter used to specify a subfunction, specified with ASCII digits r, a row or line number c, a column number COMMAND is an alphabetic string which specifies the ANSI command. It is case specific Multiple parameters are separated by semicolons ANSI Commands ESC[r;cH ESC[r;cf Changes cursor position to r, c. If parameters are omitted, sends cursor home. ESC[nA Move cursor up by n lines without changing column. Ignored if cursor already at the top. ESC[nB Move cursor down by n lines without changing column. Ignored if cursor already at the bottom. ESC[nC Using ANSI C-3 TNC Technology TOP Manual Move cursor forward by n lines without changing row. Ignored if cursor already at the right most edge. ESC[nD Move cursor backward by n lines without changing row. Ignored if cursor already at the left most edge. ESC[s Save the current cursor position. The current cursor position can later be restored with ESC[r. ESC[u Restore cursor position to the position saved with ESC[s. ESC[2J Erase the entire display and move cursor to home position (top left). ESC[K Erase to the end of the current row or line, including the current cursor position. ESC[s;...;sm Set graphics rendition to s...s. The following graphic functions are possible: Text Attributes ------------------------------------------------------ 0 | All Attributes | 5 | Blink On | Off | | ------------------------------------------------------ 1 | Bold On | 7 | Reverse Video On ------------------------------------------------------ 4 | Underscore On | 8 | Invisible On ------------------------------------------------------ Foreground Colors | Background Colors ------------------------------------------------------ 30 | Black | 40 | Black ------------------------------------------------------ 31 | Red | 41 | Red ------------------------------------------------------ 32 | Green | 42 | Green ------------------------------------------------------ 33 | Yellow | 43 | Yellow ------------------------------------------------------ 34 | Blue | 44 | Blue ------------------------------------------------------ 35 | Magenta | 45 | Magenta ------------------------------------------------------ 36 | Cyan | 46 | Cyan Using ANSI C-4 TNC Technology TOP Manual ------------------------------------------------------ 37 | White | 47 | White ESC[=sh Set video mode to s. The following mode functions are possible: 0 | 40 x 25 B&W | 7 | Wrap at end of | | | line ------------------------------------------------------ 1 | 40 x 25 Color | 14 | 640 x 200 Color ------------------------------------------------------ 2 | 80 x 25 B&W | 15 | 640 x 350 B&W ------------------------------------------------------ 3 | 80 x 25 Color | 16 | 640 x 350 Color ------------------------------------------------------ 4 | 320 x 200 Color | 17 | 640 x 480 Color ------------------------------------------------------ 5 | 320 x 200 B&W | 18 | 640 x 480 Color ------------------------------------------------------ 6 | 640 x 200 B&W | 19 | 320 x 200 Color ESC[=sl Reset mode to s. See table above, except 7 which disables wrap at end of line. ESC[code;string;...;stringp Redefine the keyboard key specified by code to sequence given by string. string is either the ASCII code for a single character or a character contained in quotation marks. For example, both "a" and 97 are equivalent. code can be one or more of the values listed in the following table. Semicolons shown must be entered in addition to the required semicolons in the command. Values shown in parentheses may not be available on all keyboards. Key | Code ------------------------------------ | Alone | Shift- | Ctrl- | Alt- ------------------------------------------------------- F1 | 0;59 | 0;84 | 0;94 | 0;104 ------------------------------------------------------- F2 | 0;60 | 0;85 | 0;95 | 0;105 ------------------------------------------------------- F3 | 0;61 | 0;86 | 0;96 | 0;106 ------------------------------------------------------- F4 | 0;62 | 0;87 | 0;97 | 0;107 ------------------------------------------------------- F5 | 0;63 | 0;88 | 0;98 | 0;108 ------------------------------------------------------- F6 | 0;64 | 0;89 | 0;99 | 0;109 ------------------------------------------------------- F7 | 0;65 | 0;90 | 0;100 | 0;110 Using ANSI C-5 TNC Technology TOP Manual ------------------------------------------------------- F8 | 0;66 | 0;91 | 0;101 | 0;111 ------------------------------------------------------- F9 | 0;67 | 0;92 | 0;102 | 0;112 ------------------------------------------------------- F10 | 0;68 | 0;93 | 0;103 | 0;113 ------------------------------------------------------- F11 | 0;133 | 0;135 | 0;137 | 0;139 ------------------------------------------------------- F12 | 0;134 | 0;136 | 0;138 | 0;140 ------------------------------------------------------- HOME | 0;71 | 55 | 0;119 | - ------------------------------------------------------- UP ARROW | 0;72 | 56 | (0; | - | | | 141) | ------------------------------------------------------- PAGE UP | 0;73 | 57 | 0;132 | - ------------------------------------------------------- LEFT ARROW | 0;75 | 52 | 0;115 | - ------------------------------------------------------- RIGHT ARROW | 0;77 | 54 | 0;116 | - ------------------------------------------------------- END | 0;79 | 49 | 0;117 | - ------------------------------------------------------- DOWN ARROW | 0;80 | 50 | (0; | - | | | 145) | ------------------------------------------------------- PAGE DOWN | 0;81 | 51 | 0;118 | - ------------------------------------------------------- INSERT | 0;82 | 48 | (0; | - | | | 146) | ------------------------------------------------------- DELETE | 0;83 | 46 | (0; | - | | | 147) | ------------------------------------------------------- HOME (gray) | (224; | (224; | (224; | (224; | 71) | 71) | 119) | 151) ------------------------------------------------------- UP ARROW (gray) | (224; | (224; | (224; | (224; | 72) | 72) | 141) | 152) ------------------------------------------------------- PAGE UP (gray) | (224; | (224; | (224; | (224; | 73) | 73) | 132) | 153) ------------------------------------------------------- LEFT ARROW (gray) | (224; | (224; | (224; | (224; | 75) | 75) | 115) | 155) ------------------------------------------------------- RIGHT ARROW (gray) | (224; | (224; | (224; | (224; | 77) | 77) | 116) | 157) ------------------------------------------------------- END (gray) | (224; | (224; | (224; | (224; | 79) | 79) | 117) | 159) ------------------------------------------------------- DOWN ARROW (gray) | (224; | (224; | (224; | (224; Using ANSI C-6 TNC Technology TOP Manual | 80) | 80) | 145) | 154) ------------------------------------------------------- PAGE DOWN (gray) | (224; | (224; | (224; | (224; | 81) | 81) | 118) | 161) ------------------------------------------------------- INSERT (gray) | (224; | (224; | (224; | (224; | 82) | 82) | 146) | 162) ------------------------------------------------------- DELETE (gray) | (224; | (224; | (224; | (224; | 83) | 83) | 147) | 163) ------------------------------------------------------- PRINT SCREEN | - | - | 0;114 | - ------------------------------------------------------- PAUSE/BREAK | - | - | 0;0 | - ------------------------------------------------------- BACKSPACE | 8 | 8 | 127 | (0) ------------------------------------------------------- ENTER | 13 | - | 10 | (0;28) ------------------------------------------------------- TAB | 9 | 0;15 | (0; | (0; | | | 148) | 165) ------------------------------------------------------- NULL | 0;3 | - | - | - ------------------------------------------------------- A | 97 | 65 | 1 | 0;30 ------------------------------------------------------- B | 98 | 66 | 2 | 0;48 ------------------------------------------------------- C | 99 | 67 | 3 | 0;46 ------------------------------------------------------- D | 100 | 68 | 4 | 0;32 ------------------------------------------------------- E | 101 | 69 | 5 | 0;18 ------------------------------------------------------- F | 102 | 70 | 6 | 0;33 ------------------------------------------------------- G | 103 | 71 | 7 | 0;34 ------------------------------------------------------- H | 104 | 72 | 8 | 0;35 ------------------------------------------------------- I | 105 | 73 | 9 | 0;23 ------------------------------------------------------- J | 106 | 74 | 10 | 0;36 ------------------------------------------------------- K | 107 | 75 | 11 | 0;37 ------------------------------------------------------- L | 108 | 76 | 12 | 0;38 ------------------------------------------------------- M | 109 | 77 | 13 | 0;50 ------------------------------------------------------- N | 110 | 78 | 14 | 0;49 ------------------------------------------------------- O | 111 | 79 | 15 | 0;24 ------------------------------------------------------- Using ANSI C-7 TNC Technology TOP Manual P | 112 | 80 | 16 | 0;25 ------------------------------------------------------- Q | 113 | 81 | 17 | 0;16 ------------------------------------------------------- R | 114 | 82 | 18 | 0;19 ------------------------------------------------------- S | 115 | 83 | 19 | 0;31 ------------------------------------------------------- T | 116 | 84 | 20 | 0;20 ------------------------------------------------------- U | 117 | 85 | 21 | 0;22 ------------------------------------------------------- V | 118 | 86 | 22 | 0;47 ------------------------------------------------------- W | 119 | 87 | 23 | 0;17 ------------------------------------------------------- X | 120 | 88 | 24 | 0;45 ------------------------------------------------------- Y | 121 | 89 | 25 | 0;21 ------------------------------------------------------- Z | 122 | 90 | 26 | 0;44 ------------------------------------------------------- 1 | 49 | 33 | - | 0;120 ------------------------------------------------------- 2 | 50 | 64 | 0 | 0;121 ------------------------------------------------------- 3 | 51 | 35 | - | 0;122 ------------------------------------------------------- 4 | 52 | 36 | - | 0;123 ------------------------------------------------------- 5 | 53 | 37 | - | 0;124 ------------------------------------------------------- 6 | 54 | 94 | 30 | 0;125 ------------------------------------------------------- 7 | 55 | 38 | - | 0;126 ------------------------------------------------------- 8 | 56 | 42 | - | 0;127 ------------------------------------------------------- 9 | 57 | 40 | - | 0;128 ------------------------------------------------------- 0 | 48 | 41 | - | 0;129 ------------------------------------------------------- - | 45 | 95 | 31 | 0;130 ------------------------------------------------------- = | 61 | 43 | - | 0;131 ------------------------------------------------------- [ | 91 | 123 | 27 | 0;26 ------------------------------------------------------- ] | 93 | 125 | 29 | 0;27 ------------------------------------------------------- \ | 92 | 124 | 28 | 0;43 ------------------------------------------------------- ; | 59 | 58 | - | 0;39 ------------------------------------------------------- Using ANSI C-8 TNC Technology TOP Manual ' | 39 | 24 | - | 0;40 ------------------------------------------------------- , | 44 | 60 | - | 0;51 ------------------------------------------------------- . | 46 | 62 | - | 0;52 ------------------------------------------------------- / | 47 | 63 | - | 0;53 ------------------------------------------------------- ` | 96 | 126 | - | (0;41) ------------------------------------------------------- ENTER (keypad) | 13 | - | 10 | (0; | | | | 166) ------------------------------------------------------- / (keypad) | 47 | 47 | (0; | (0;74) | | | 142) | ------------------------------------------------------- * (keypad) | 42 | (0; | (0;78) | - | | 144) | | ------------------------------------------------------- - (keypad) | 45 | 45 | (0; | (0; | | | 149) | 164) ------------------------------------------------------- + (keypad) | 43 | 43 | (0; | (0;55) | | | 150) | ------------------------------------------------------- 5 (keypad) | (0;76) | 53 | (0; | - | | | 143) | For example, to exchange the number 1 with the number 9 (and thoroughly confuse anyone who uses your system), use the escape sequence: ESC[49;57pESC[57;49p Using ANSI C-9 ################################################################################ ################################################################################ Appendix D TOP DMTs ################################################################################ ################################################################################ TNC Technology TOP Manual Using TOP DMTs DMT is an old three letter acronym (TLA) which stands for Day-Month-Time. In the early days of non-personal computing, computers took too long to boot up, so people never shut them off at all. In between times they still didn't want the screen to show their private data though, so the concept of the DMT was born. They reasoned: since I don't want anything on my screen, but I have all this horsepower sitting idle, why not do something useful? A simple program was written to continuously display the current day-month-time so the user could have a warm fuzzy feeling that his computer had not yet crashed. Realizing that a continuous display might burn the phosphor on their VDTs, the designers decided to periodically move the day-month time display around. And thus, DMTs were born. Today, we can shut off our PCs, but we still tend to leave them on and unattended during the day. And most of us still don't want our VDTs to have burned phosphor. We could use a screen saver type program, but they just blank the screen and don't do anything else to let us know whether or not our computers have crashed. Besides, what if we didn't want to blank the screen, but instead wanted to execute something else during an idle period? If TOP man were here you know what he'd say: Use TOP! TOPDMT: Automatic Time-out Execution TOP has a function, called TOPDMT, which will automatically execute a program after a user-definable period of idle time. The program can be any executable but is typically a DMT. A few colorful screen saver sample programs have been included with the shareware version of TOP (more are included with the registered version). TOPDMT is an environment variable used to specify the name of the program to be executed when the KeyboardTimeout time specified in the [Initialize] section of TOP.INI is satisfied. TOPDMT must contain a valid executable program, including path definition if required. TOPDMT is usually specified in the [InitialCommands] section of TOP.INI, but can be specified at the command line using the SET command. Any user program can be specified by TOPDMT and it will automatically be started after the idle time specified elapses (idle time is when your computer is doing nothing else - i.e. when no programs are running and the prompt is displayed). See also KeyboardTimeout in the [Initialize] section of TOP.INI for more details. Running TOPDMT Included Programs After you have installed TOP, the TOPDMT programs will be located in a subdirectory in the TOP directory called VIDEO. You can run any of these programs by simply typing their name at the command line. It's usually best to run the program this way first so you can decide how you want it configured. To find out more about the options of a specific program, type the program name followed by a question mark. A usage message will be displayed. Try running them all! Running Non-DMT Programs To automatically run a non-DMT program, set TOPDMT to specify the name and path TOP DMTs D-2 TNC Technology TOP Manual of that program. Include any required command line options. Also, unless the program was written to be DMT aware (see Writing Your Own DMT below), you may wish to set IgnoreDmtError to yes in the [Initialize] section of TOP.INI. This will prevent TOP from falsely detecting exit error level codes from programs that do not set the error level on exit. Writing Your Own DMT Writing your own DMT program might be easier than you expect, since TOP can do some of the work for you. For example, the screen and mode does not need to be saved if RestoreScreen and RestoreMode are yes in the [Video] section of TOP.INI (these are the default settings).However, to be fully compatible with TOP, you must accept a "-x exitTime" switch, and set the error level code appropriately on exit. If you do not wish to comply with these compatibility requirements, or you didn't write the DMT program, set IgnoreDmtError to yes in the [Initialize] section of TOP.INI. "-x exitTime" Switch When TOP issues a DMT program command (as specified by the environment variable TOPDMT), TOP automatically appends -x exitTime to the end of the issued command. "exitTime" is replaced by the number of minutes to the next CRON job. It is expected the DMT program will exit after exitTime minutes so the CRON job can be executed. When writing your own DMT program, your program should also accept this parameter if you want CRON jobs to be executed during DMT execution. When your program exits as a result of a exitTime time-out, set the error level exit code to 2. This alerts TOP that the exit was a planned result of exitTime. After the CRON job is executed, the DMT will be restarted immediately, without waiting for a keyboard time-out. Other Exit Codes Your DMT program needs two other ways to exit: normally, or as a result of an error. Normal exit is a result of the user wishing to terminate the DMT, i.e. by pressing a key, etc. If the DMT program exits normally, set the error level to 0. If your DMT program exits as a result of a detected error, such as not enough memory, or a bad parameter on the command line, set the error level to 1. This alerts TOP that an error occurred, and TOP will not try to reload the DMT program until TOPDMT is changed. Have fun and keep hacking! Using PLAYTUNE PLAYTUNE is a utility which reads and plays music. After you have installed TOP, PLAYTUNE will be located in a subdirectory in the TOP directory called AUDIO, along with some sample music files. To run PLAYTUNE, type: PLAYTUNE notefile [-t notetime] where notefile is an ascii text file containing a sequence of musical notes, TOP DMTs D-3 TNC Technology TOP Manual and optionally notetime is the time for one full note in milliseconds (the default time if not specified is 250). The format for each note in notefile is: P [A] O D [.] | | | | +- Dot if present, extends duration by 50% | | | +---- Duration 1 = whole note, 2 = half note... | | +------- Octive 0 = lowest, 8 = highest | +---------- Accidental one of #,b [optional] +------------- Pitch one of A,B,C,D,E,F,G,R,- (R or '-' means rest) For example, C#4 8 plays a sharp middle C for one eighth note. Spaces, tabs, and carriage returns can optionally be placed between any note or note element. A few short tunes have been included with your TOP release. You'll find them in the AUDIO subdirectory of your TOP directory. Have fun! TOP DMTs D-4 ################################################################################ ################################################################################ Appendix E Using TOPSET ################################################################################ ################################################################################ TNC Technology TOP Manual Using TOP's Setup Utility: TOPSET Included with your TOP release is TOPSET, an interactive setup tool to help you easily set and maintain TOP parameters. Using TOPSET, all TOP parameters are presented in a menu format, with context sensitive help for each entry. Using TOPSET is exceptionally easy. At the command line, type TOPSET (with the appropriate path specification if you are not in the TOP directory): c:\top>topset In fact, the default installation of TOP will define an FKEY to start TOPSET. Just hit . After starting, pressing displays help. After starting, you'll see a menu of setup choices. Any of these can be selected by using the arrow keys or the space bar and pressing . Also, like all TOP tools, the mouse can be used. Just double click the left mouse button on your choice. After making a selection, you'll see a list of TOP parameters which can be changed in a window on the left side of your screen. To select the parameter to be changed, use the up or down arrow key to move the highlight over the parameter you want to examine or change (or click the left mouse button on your choice). If all the parameters don't fit in the window, scroll bars appear which can be actuated with the up or down arrow keys or the left button of the mouse. As you move the highlight up and down you'll see complete help for that parameter displayed in the window on the right side of the screen. The help explains the setting of that parameter nd lists all choices. If all the help doesn't fit in the window, scroll bars appear. The scroll bars can be actuated with the or keys to scroll a page at a time, or, on some keyboards, by pressing with an up or down arrow. The scroll bars can also be actuated with the left mouse button. At any menu level in TOPSET, pressing will move up one level. Pressing the right mouse button is the same as pressing . Using TOPSET E-2 ################################################################################ ################################################################################ Appendix F TOP Color Names ################################################################################ ################################################################################ TNC Technology TOP Manual TOP Color Names Included below is a complete list of color names which can be used in either the [Palette] or [AnalogMonoPalette] sections of TOP.INI. This list is also available on line when using TOPSET, TOP's setup utility. | Equivalent color setting Color Name --------------------------------- | Red | Green | Blue ------------------------------------------------------ Black | 0 | 0 | 0 ------------------------------------------------------ Blue | 0 | 0 | 168 ------------------------------------------------------ MediumBlue | 0 | 0 | 205 ------------------------------------------------------ BrightBlue | 84 | 84 | 255 ------------------------------------------------------ DarkGreen | 0 | 100 | 0 ------------------------------------------------------ Green | 0 | 168 | 0 ------------------------------------------------------ Cyan | 0 | 168 | 168 ------------------------------------------------------ DeepSkyBlue | 0 | 191 | 255 ------------------------------------------------------ DarkTurquoise | 0 | 206 | 209 ------------------------------------------------------ MediumSpringGreen | 0 | 250 | 154 ------------------------------------------------------ BrightGreen | 84 | 255 | 84 ------------------------------------------------------ SpringGreen | 0 | 255 | 127 ------------------------------------------------------ BrightCyan | 84 | 255 | 255 ------------------------------------------------------ MidnightBlue | 25 | 25 | 112 ------------------------------------------------------ DodgerBlue | 30 | 144 | 255 ------------------------------------------------------ LightSeaGreen | 32 | 178 | 170 ------------------------------------------------------ ForestGreen | 34 | 139 | 34 ------------------------------------------------------ SeaGreen | 46 | 139 | 87 ------------------------------------------------------ DarkSlateGray | 47 | 79 | 79 ------------------------------------------------------ LimeGreen | 50 | 205 | 50 ------------------------------------------------------ MediumSeaGreen | 60 | 179 | 113 ------------------------------------------------------ DarkGray | 84 | 84 | 84 ------------------------------------------------------ TOP Color Names F-2 TNC Technology TOP Manual Turquoise | 64 | 224 | 208 ------------------------------------------------------ RoyalBlue | 65 | 105 | 225 ------------------------------------------------------ SteelBlue | 70 | 130 | 180 ------------------------------------------------------ DarkSlateBlue | 72 | 61 | 139 ------------------------------------------------------ MediumTurquoise | 72 | 209 | 204 ------------------------------------------------------ DarkOliveGreen | 85 | 107 | 47 ------------------------------------------------------ CadetBlue | 95 | 158 | 160 ------------------------------------------------------ CornflowerBlue | 100 | 149 | 237 ------------------------------------------------------ MediumAquamarine | 102 | 205 | 170 ------------------------------------------------------ Gray | 105 | 105 | 105 ------------------------------------------------------ SlateBlue | 106 | 90 | 205 ------------------------------------------------------ OliveDrab | 107 | 142 | 35 ------------------------------------------------------ SlateGray | 112 | 128 | 144 ------------------------------------------------------ LightSlateGray | 119 | 136 | 153 ------------------------------------------------------ MediumSlateBlue | 123 | 104 | 238 ------------------------------------------------------ LawnGreen | 124 | 252 | 0 ------------------------------------------------------ Aquamarine | 127 | 255 | 212 ------------------------------------------------------ Red | 168 | 0 | 0 ------------------------------------------------------ Magenta | 168 | 0 | 168 ------------------------------------------------------ DimOrange | 128 | 64 | 0 ------------------------------------------------------ DimYellow | 168 | 168 | 0 ------------------------------------------------------ White | 168 | 168 | 168 ------------------------------------------------------ LightSlateBlue | 132 | 112 | 255 ------------------------------------------------------ SkyBlue | 135 | 206 | 235 ------------------------------------------------------ LightSkyBlue | 135 | 206 | 250 ------------------------------------------------------ BlueViolet | 138 | 43 | 226 ------------------------------------------------------ SaddleBrown | 139 | 69 | 19 ------------------------------------------------------ TOP Color Names F-3 TNC Technology TOP Manual DarkSeaGreen | 143 | 188 | 143 ------------------------------------------------------ MediumPurple | 147 | 112 | 219 ------------------------------------------------------ DarkViolet | 148 | 0 | 211 ------------------------------------------------------ PaleGreen | 152 | 251 | 152 ------------------------------------------------------ DarkOrchid | 153 | 50 | 204 ------------------------------------------------------ YellowGreen | 154 | 205 | 50 ------------------------------------------------------ Purple | 160 | 32 | 240 ------------------------------------------------------ Sienna | 160 | 82 | 45 ------------------------------------------------------ Brown | 165 | 42 | 42 ------------------------------------------------------ LightBlue | 173 | 216 | 230 ------------------------------------------------------ GreenYellow | 173 | 255 | 47 ------------------------------------------------------ PaleTurquoise | 175 | 238 | 238 ------------------------------------------------------ Maroon | 176 | 48 | 96 ------------------------------------------------------ LightSteelBlue | 176 | 196 | 222 ------------------------------------------------------ PowderBlue | 176 | 224 | 230 ------------------------------------------------------ Firebrick | 178 | 34 | 34 ------------------------------------------------------ DarkGoldenrod | 184 | 134 | 11 ------------------------------------------------------ MediumOrchid | 186 | 85 | 211 ------------------------------------------------------ RosyBrown | 188 | 143 | 143 ------------------------------------------------------ DarkKhaki | 189 | 183 | 107 ------------------------------------------------------ PaleGray | 192 | 192 | 192 ------------------------------------------------------ MediumVioletRed | 199 | 21 | 133 ------------------------------------------------------ IndianRed | 205 | 92 | 92 ------------------------------------------------------ Peru | 205 | 133 | 63 ------------------------------------------------------ VioletRed | 208 | 32 | 144 ------------------------------------------------------ Chocolate | 210 | 105 | 30 ------------------------------------------------------ Tan | 210 | 180 | 140 ------------------------------------------------------ TOP Color Names F-4 TNC Technology TOP Manual LightGray | 211 | 211 | 211 ------------------------------------------------------ Thistle | 216 | 191 | 216 ------------------------------------------------------ Orchid | 218 | 112 | 214 ------------------------------------------------------ Goldenrod | 218 | 165 | 32 ------------------------------------------------------ PaleVioletRed | 219 | 112 | 147 ------------------------------------------------------ Gainsboro | 220 | 220 | 220 ------------------------------------------------------ Plum | 221 | 160 | 221 ------------------------------------------------------ Burlywood | 222 | 184 | 135 ------------------------------------------------------ LightCyan | 224 | 255 | 255 ------------------------------------------------------ Lavender | 230 | 230 | 250 ------------------------------------------------------ DarkSalmon | 233 | 150 | 122 ------------------------------------------------------ Violet | 238 | 130 | 238 ------------------------------------------------------ LightGoldenrod | 238 | 221 | 130 ------------------------------------------------------ PaleGoldenrod | 238 | 232 | 170 ------------------------------------------------------ LightCoral | 240 | 128 | 128 ------------------------------------------------------ Khaki | 240 | 230 | 140 ------------------------------------------------------ AliceBlue | 240 | 248 | 255 ------------------------------------------------------ Honeydew | 240 | 255 | 240 ------------------------------------------------------ Azure | 240 | 255 | 255 ------------------------------------------------------ SandyBrown | 244 | 164 | 96 ------------------------------------------------------ Wheat | 245 | 222 | 179 ------------------------------------------------------ Beige | 245 | 245 | 220 ------------------------------------------------------ WhiteSmoke | 245 | 245 | 245 ------------------------------------------------------ MintCream | 245 | 255 | 250 ------------------------------------------------------ GhostWhite | 248 | 248 | 255 ------------------------------------------------------ Salmon | 250 | 128 | 114 ------------------------------------------------------ AntiqueWhite | 250 | 235 | 215 ------------------------------------------------------ TOP Color Names F-5 TNC Technology TOP Manual Linen | 250 | 240 | 230 ------------------------------------------------------ YellowGoldenrod | 250 | 250 | 210 ------------------------------------------------------ OldLace | 253 | 245 | 230 ------------------------------------------------------ BrightRed | 255 | 84 | 84 ------------------------------------------------------ BrightMagenta | 255 | 84 | 255 ------------------------------------------------------ DeepPink | 255 | 20 | 147 ------------------------------------------------------ OrangeRed | 255 | 69 | 0 ------------------------------------------------------ Tomato | 255 | 99 | 71 ------------------------------------------------------ HotPink | 255 | 105 | 180 ------------------------------------------------------ Coral | 255 | 127 | 80 ------------------------------------------------------ DeepOrange | 255 | 140 | 0 ------------------------------------------------------ LightSalmon | 255 | 160 | 122 ------------------------------------------------------ Orange | 255 | 165 | 0 ------------------------------------------------------ LightPink | 255 | 182 | 193 ------------------------------------------------------ Pink | 255 | 192 | 203 ------------------------------------------------------ Gold | 255 | 215 | 0 ------------------------------------------------------ PeachPuff | 255 | 218 | 185 ------------------------------------------------------ NavajoWhite | 255 | 222 | 173 ------------------------------------------------------ Moccasin | 255 | 228 | 181 ------------------------------------------------------ Bisque | 255 | 228 | 196 ------------------------------------------------------ MistyRose | 255 | 228 | 225 ------------------------------------------------------ BlanchedAlmond | 255 | 235 | 205 ------------------------------------------------------ PapayaWhip | 255 | 239 | 213 ------------------------------------------------------ LavenderBlush | 255 | 240 | 245 ------------------------------------------------------ Seashell | 255 | 245 | 238 ------------------------------------------------------ Cornsilk | 255 | 248 | 220 ------------------------------------------------------ LemonChiffon | 255 | 250 | 205 ------------------------------------------------------ TOP Color Names F-6 TNC Technology TOP Manual FloralWhite | 255 | 250 | 240 ------------------------------------------------------ Snow | 255 | 250 | 250 ------------------------------------------------------ Yellow | 255 | 255 | 84 ------------------------------------------------------ LightYellow | 255 | 255 | 224 ------------------------------------------------------ Ivory | 255 | 255 | 240 ------------------------------------------------------ BrightWhite | 255 | 255 | 255 TOP Color Names F-7